On Monday, May 12, 2014 5:49:23 AM UTC-7, Trevor Overman wrote:
>
> What would be the most effective way to load, for example, 25 more 
> database tables via an ajax function on clicking, for example again, a more 
> button?
> What I am trying to do is load the first 25 tables and have this list 
> concatenated for the next 25 in the sorted list. 
> The problem I'm running across is keeping the sorting intact. I know this 
> could be done by selecting the whole database, but I'm wanting to avoid 
> that. 
>
> def example():
>     table_list = db(db.example).select(limitby=(0, 25))
>     return dict(table_list=table_list)
>
>
> Thanks for the help! 
>


Pardon me, but I think you means "rows" rather than "tables"    (db.example 
is a table, innit, but the select is picking out rows)

Doesn't SQLTABLE or SQLFORM do something similar?  I haven't played around 
much with letting the user click-to-sort, but you should be able to get 
some ideas from inspecting the widget code.

/dps

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to