No. The first argument of SQLFORM.grid can be a table or a query. A SQLFORM.smartgrid looks a lot like a grid, in fact it contains a grid but it is designed to take as input not a query but only one table and to browse said table and selected referencing tables.
You can use SQLFORM.grid, but not smartgrid. On Tuesday, January 22, 2013 12:24:23 PM UTC-7, Alex Glaros wrote: > > Here is an example of a SET named "purchased" from the > documentation<http://www.web2py.com/examples/default/examples> > : > > purchased = \n (db.person.id==db.purchase.buyer_id)&\n > (db.product.id==db.purchase.product_id) > > Can Smartgrid use the SET "purchased" instead of a table, e.g., as in the > example below (instead of tables "person", "product", "purchase)? > > def manage_transactions(): > grid = SQLFORM > <http://www.web2py.com/examples/global/vars/SQLFORM>.smartgrid(db.person,linked_tables=['product','purchase'], > user_signature=False) > return dict(grid=grid) > > What would the syntax look like? > > Thanks, > > Alex Glaros > > > --

