> Good point -- perhaps orderby_on_limitby should default to False -- then >> the grid can simply set it to True. Actually, I wonder if the grid should >> go further and additionally order on primary keys even when an explicit >> orderby is specified (just in case the orderby field(s) do not contain >> unique values). >> > > No, it should preserve the order you set. If you know enough to set the > order, you can add columns to the order easily enough. >
Not sure I agree with that. Users typically specify an orderby only because they would like the records displayed in a particular order, not because they are seeking to explicitly handle pagination. Let's say I'm listing US addresses in a grid and specify orderby=db.address.state. In that case, I'm saying I want addresses sorted by state, and within state, I don't care about the order. But I'm not saying that I want pagination to fail in case records from a given state happen to span from one page to the next. Just because I want to order by state doesn't mean I know enough to provide all the necessary orderby fields to guarantee proper pagination. If the grid does this for me when I specify no orderby, why shouldn't it do it for me when I do specify an orderby? Anthony -- 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/groups/opt_out.