OK fine, then why, in continuation of the above example,
def test():
grid = SQLFORM.smartgrid(db.person, linked_tables=['dog'], ondelete=dict
( dog=ondelete_test ))
return dict(grid=grid)
def ondelete_test(table_involved, id_of_the_deleted_record):
print table_involved
print id_of_the_deleted_record
ondelete=dict( dog=ondelete_test ) doesn't fire (nothing is printed, one
dog row is removed but on refresh is back),
while
ondelete=ondelete_test does fire, prints the values, and removes
permantly the rows
ondelete doesn't belong to both grid and smartgrid? Or this is a bug?
On Tuesday, January 15, 2013 1:30:12 AM UTC, Massimo Di Pierro wrote:
>
> The rule is simple. All options that belong to both grid and smartgrid
> (except args) can take a dictionary in smartgrid. If a dictionary is
> passed, the value is passed the grid, in correspondance to a key ==
> tablename.
>
>
>
--