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
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:
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():
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
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
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
6 matches
Mail list logo