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