What you want to do is not supported by the grid out of the box. You could hide the standard Edit button and instead create a custom button/link for editing, though you would have to write the code to generate the form interface and handle the database updates. Alternatively, you might consider the smartgrid, which allows you to navigate a set of linked tables, though the UI experience is different from what you've got now (you only view one table at a time, but you can then link to associated records in other tables).
Anthony On Monday, November 9, 2015 at 9:20:12 AM UTC-5, Carla Raquel wrote: > > I'm using an SQL grid to display values from two distinct tables. This is > what I have: > > def manageUsers(): > > query = (db.Extension.Person == db.auth_user.id ) > grid = SQLFORM.grid(query,csv = False,paginate=25,user_signature=True) > return (grid = grid) > > The grid shows perfectly fine with both tables fields' associating with > each other,the problem is, when I click the "edit" button and I want to be > able to edit fields from both tables, but the fields from the table > "Extension" appear with "None" attributes. Looking at the link in the > "Edit" button, only the auth_user table is being sent, like this > "...manageUsers/edit/auth_user.." so this is why probably the other tables' > fields show as "None". In my view I access the fields like this: > > {{=grid.update_form.custom.widget.name_of_field}} > > My question is, how can I edit fields from both tables when I click the > edit button? > > -- 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.