1) this is not supported syntax: grid = SQLFORM.grid(data_rows) you cannot bass rows to the grid. You must pass a table or a query to the grid. The grid has its own rules for fetching rows and cols.
2) not sure, depends on the data, but you do ainner join, that can results in some columns having lots of duplicated values. On Tuesday, 8 September 2015 19:12:58 UTC-5, Alex Glaros wrote: > > Trying to copy example from book below: > > > - query = db.dog.owner ==db.person.id > - rows = db(db.person).select(db.person.name, db.dog.name, > left=db.dog.on(query)) > - result is person is listed even if has no dog > > > > query = ((db.StaffPosition.jobClassification==db.JobClassification.id) > & (db.StaffPositionOrganization.staffPosition==db.StaffPosition.id) > &(db.StaffPositionOrganization.organizationID==specificOrganization.id) & > (db.StaffPosition.superObjectID==db.auth_membership.superObjectID) & > (db.auth_membership.group_id==db.auth_group.id) & > (db.auth_group.roleType==50)) #"query" works if plugged directly into grid > # db.JobClassification is the parent table whose record should display > a record even if there are no db.StaffPosition child records for it > data_rows = db(db.JobClassification).select(left= db.StaffPosition.on > (query)) > grid = SQLFORM.grid(data_rows) > > Two errors: > > 1. Rows' object has no attribute '_db'. I don't know how to convert > "data_rows" from a set to a query > 2. I get many redundant rows from "data_rows" set (but not from "query" > query) > > thanks, > > Alex Glaros > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

