Inspired on Jim's post, this works for me(o delete or create at parent table level):
currentTable = request.args(1) if currentTable: deletable= create= True else: deletable= create= False grid = SQLFORM.smartgrid(... create=create,deletable=deletable, ... ) On Monday, March 11, 2013 2:36:12 PM UTC-5, Michael Hall wrote: > > My tables are: > t_contact (the parent) > t_paypal > t_paypal_fails > t_paypal_contacted > > All the child tables refer to the parents ID. > > I have a controller that looks like this: > > @auth.requires_login() > def paypal_manage(): > form = > SQLFORM.smartgrid(db.t_contact,linked_tables=['t_paypal','t_paypal_fails', > 't_paypal_contacted'], onupdate=auth.archive,searchable=dict(parent=True, > child=True,)) > return locals() > > Using smartgrid I wish to achieve a grid that allows the user to search > by contact but not actually add contacts via that controller. Once they > have found the contact they should be able to create records for the > contacts's linked tables. > > I was thinking that it would be something like this: > create=dict(parent=True, child=False) > > Is this possible? If so what is the correct syntax? > > Many thanks in advance. > > -- 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.