Have you tried: grid = SQLFORM.smartgrid(..., orderby=dict(parent=db.parent.id))
Most arguments to smartgrid can be dictionaries with the associated table names as keys. Anthony On Friday, October 16, 2015 at 5:33:58 AM UTC-4, Edward Shave wrote: > > When I set orderby=~db.parent.id the parent grid displays in reverse > order as wanted. > > But now the children list has only a row of buttons on each line. Where > has the data gone? > > I tried setting the orderby clause conditionally like this... > > if some condition: > form.orderby=~db.parent.id > > although this does not cause any error it doesn't reverse the order > either, so probably not doing anything. > -- 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.