Re: [web2py] Create links in smartgrid for the child

2016-03-31 Thread Massimiliano
There is a simple way :-) from the code: https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2914 links(dict): like `{'tablename':[lambda row: A(), ...]}` that will add buttons when table tablename is displayed On Thu, Mar 31, 2016 at 12:18 PM, Massimiliano wrote: > Sorry is a

Re: [web2py] Create links in smartgrid for the child

2016-03-31 Thread Massimiliano
Sorry is a little more complex to get the table name involved. It should be in request.args(1) table = request.args(1).rpartition('.')[0] On Thu, Mar 31, 2016 at 12:10 PM, Massimiliano wrote: > Maybe you can check the table involved and set links option accordingly. > > Something like: > > tab

Re: [web2py] Create links in smartgrid for the child

2016-03-31 Thread Massimiliano
Maybe you can check the table involved and set links option accordingly. Something like: table = request.args(0) or ‘dashboard’ links = [] if table == ‘label_dashboard’: links=[…] grid = SQLFORM.smartgrid(db.dashboard,linked_tables=[‘label_dashboard’], links=links) Not tested On Wed, Mar

[web2py] Create links in smartgrid for the child

2016-03-30 Thread Alessio Varalta
Hi I have a smartgrid with one child and i want a to add links to my child is possibile for example: I have entity dashboard with a child label_dashboard So i create the smartgrid grid = SQLFORM.smartgrid(db.dashboard,linked_tables=['label_dashboard']) Now I want to add links to label_das