grid = SQLFORM.grid(db.Cars) does what you ask. Look at the generated code
and the source code of the grid in sqlhtml.py
On Monday, 16 July 2012 02:38:53 UTC-5, Hassan Alnatour wrote:
>
> Dear ALL ,,
>
> I want to delete records and return them in ajax , i have a table like
> this :
>
> db.define_table('Cars',
> Field('Name'),
> Field('Age')
> )
>
> and i get all the records to my page using a for loop over the object
> the equals db().select(db.Cars.ALL)
>
> what i want is to have a button next to every car to delete it in ajax and
> update the records that i am viewing
>
>
> what is the best way to do this ?
>
>
> Best Regards,
>
>