You cannot a have an inner join in smartgrid. That's the biggest difference in this case. You can have orderby.
On Monday, 21 May 2012 15:47:53 UTC-5, Jim S wrote: > > Massimo - Is there a way to do it with a .smartgrid. I know the question > wasn't on .smartgrid, but I'm using that extensively and too would like > some sort of solution. > > -Jim > > On 5/21/2012 3:11 PM, Massimo Di Pierro wrote: > > foreign key. You can do a join. > > On Monday, 21 May 2012 14:49:06 UTC-5, Jim S wrote: >> >> You can specify the sort order using the orderby parameter. But, I >> don't know how you get it to sort by the displayed value of a foreign >> key column. >> >> Ex: >> >> orderby = [~db.asset.acquiredOn, db.asset.assetTag, db.asset.description] >> >> ~ orders descending. >> >> -Jim >> >> On 5/21/2012 2:23 PM, Keith Edmunds wrote: >> > Two questions re SQLFORM.grid sorting. >> > >> > 1. Is it possible to specify the initial sort order? >> > >> > 2. I'm displaying a table that includes a foreign field. When I click >> on >> > the header to sort by that field, it sorts by the field id rather than >> by >> > the (displayed) foreign field. Can I sort by the displayed field? >> > >> > Thanks, >> > Keith >> > -- 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.