[web2py] Re: Getting all rows from SQLFORM.grid

2014-05-07 Thread Anthony
if request.get_vars.keywords: rows = SQLFORM.grid(..., paginate=100).rows Just set paginate higher than the maximum number of possible rows (if necessary, you can precede it with a count of the rows in the table). Anthony On Wednesday, May 7, 2014 3:12:13 PM UTC-4, Kyle Flanagan wrote:

[web2py] Re: Getting all rows from SQLFORM.grid

2014-05-07 Thread Kyle Flanagan
No, I want to be able to construct a Rows object containing all the records matching the sorting and query on the gird. I might be able to better illustrate with an example: model: ... db.define_table('People', Field('name', 'string'), Field('age', 'integer')) db.People.insert(name="Abe",

[web2py] Re: Getting all rows from SQLFORM.grid

2014-05-07 Thread Anthony
Are you saying you simply want to display all the records in case the user does a search? What if the query returns thousands of records? Anyway, in the case of a search, you can always set "paginate" to be sufficiently high: grid = SQLFORM.grid(..., paginate=200 if request.get_vars.keywords els