Hi,

Same story here. I like *grid*, I like pagination, however I'm missing the 
feature of limiting the total number of rows in the output.
In my case *grid* can easily generate over 1+m rows in the output, which 
when paginating by 50 rows per page, would produce 20k+ pages...
Who needs that many pages? Who would click 20+k times anyway? 

For instance jumping from the page 19201 to 19202 would eat tremendous 
amount of resources and may take 20+ sec to complete on my low resources 
server...

In my scenario an easy workaround would be to sort by date (orderby 
parameter in the *grid*, which works well and I'm glad it's there) and then 
display, lets say 1000 rows in total. That would yield 20 pages when 
paginating by 50 rows per page - excellent.

So I wonder why don't you let the user to decide, how many rows one needs? 
Why it's all or nothing? If there is orderby, why then limitby is missing? 
:/ 







2013 m. gegužė 6 d., pirmadienis 01:22:03 UTC+1, villas rašė:
>
> If you don't need the main features of the grid (eg pagination) then it is 
> better not to use it.  I mean, it is a trivial task to produce a nice table 
> without pagination.
>
> The other option would be to hide the pagination with jQuery,  which 
> should also be easy to do.
>
>
> On Friday, May 3, 2013 5:54:08 PM UTC+1, Mandar Vaze wrote:
>>
>>
>>
>> On Monday, April 23, 2012 7:57:23 PM UTC+5:30, Bruce Wade wrote:
>>>
>>> Yeah see that was my original question how to tell grid to only 
>>> select/count the first 50,000 records instead of it just generating pages 
>>> for all the records. 
>>>
>>
>> I understand that this is an year-old thread - but I too have a 
>> requirement to show ONLY X records out of total Y records it would 
>> otherwise show across pages.
>>
>> Other thing that might work for me is if there is a way to NOT show the 
>> pagination at all. This way I can set paginate=X and since user can't 
>> "access" pagination, it would provide similar result as if SQLFORM.grid 
>> limited the number of records displayed to the user.
>>
>> This is useful when you want to show like "Top 10" (Or in case of Bruce 
>> Above, Top 200 Ads) of some query.
>>
>> -Mandar
>>
>>  
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to