[web2py] Re: edit or delete child or detail table on SQLFORM.grid with left join

2017-03-21 Thread Massimo Di Pierro
The A helper also has a A(..., callback=URL()) that posts to the callback. But I think _onclick is more explicit. On Tuesday, 21 March 2017 16:00:05 UTC-5, 黄祥 wrote: > > a, i c, thank you so much for your example massimo, that's why my old code > not work because i'm using _href > e.g. > def

[web2py] Re: edit or delete child or detail table on SQLFORM.grid with left join

2017-03-21 Thread 黄祥
a, i c, thank you so much for your example massimo, that's why my old code not work because i'm using _href e.g. def index(): grid = SQLFORM.grid(db.thing, links=[lambda row: A('check',_onclick="jQuery.post('%s')" % URL('check',args=row.id))]) #grid = SQLFORM.grid(db.thing, links=[lambda row:

[web2py] Re: edit or delete child or detail table on SQLFORM.grid with left join

2017-03-21 Thread Massimo Di Pierro
For example: db.define_table('thing',Field('name'),Field('checked','boolean',readable=False)) def index(): grid = SQLFORM.grid(db.thing, links=[lambda row: A('check',_onclick="jQuery.post('%s')" % URL('check',args=row.id))]) return dict(grid=grid) def check():

[web2py] Re: edit or delete child or detail table on SQLFORM.grid with left join

2017-03-20 Thread 黄祥
could anyone give an example to custom button in grid that does an ajax query? another question is oot : what is the best practice to define table for transaction that separated for header and detail? when use header and detail it good for normalisation but not good in operational, in case

Re: [web2py] Re: edit or delete child or detail table on SQLFORM.grid with left join

2017-03-20 Thread Fabiano Almeida
Thanks Massimo, I will try this. 2017-03-20 11:41 GMT-03:00 Massimo Di Pierro : > Unfortunately not out of the box. You need a custom button that does a > ajax query. > > > On Friday, 3 March 2017 17:52:30 UTC-6, 黄祥 wrote: >> >> is it possible to edit or delete child

[web2py] Re: edit or delete child or detail table on SQLFORM.grid with left join

2017-03-20 Thread Massimo Di Pierro
Unfortunately not out of the box. You need a custom button that does a ajax query. On Friday, 3 March 2017 17:52:30 UTC-6, 黄祥 wrote: > > is it possible to edit or delete child or detail table on SQLFORM.grid > with left join? > i've tried before it seems the edit is for the first table