can use the following :-
form=SQLFORM.grid(db.auth_user, create=False, selectable = lambda ids:
del_emp(ids))
def del_emp(ids):
if not ids:
response.flash='Please Select the Check-box to Delete'
else:
for row in ids:
db(
db.auth_user.id == row).delete()
pass
pass
return ''
you can see the submit button at the bottom of grid you can select the
multiple check-box at a time and click the submit button it will
delete the all select-able row at a time
On Mar 26, 12:06 pm, Sebastien Stormacq <
sebastien.storm...@gmail.com>
wrote:
> Thanks !
>
>
>
>
>
>
>
> On Saturday, March 24, 2012 5:26:52 AM UTC+1, Javier wrote:
>
> > sabsto
>
> > You can use selectable, for example:
>
> > selectable = lambda ids: delete(ids)
> > form=SQLFORM.grid(query,selectable=selectable)
>
> > def delete(ids):
> > to_delete=db(db.tabla.id.belongs(ids))
> > to_delete.delete()
>