Re: [web2py] Tip of the day... ajax buttons in grid

2013-03-07 Thread Niphlod
On Thursday, March 7, 2013 5:00:33 PM UTC+1, Richard wrote: > > What is the purpose? In line edition or something? > > a simple one but yes, kinda. Inline editing is a WIP :P -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubsc

Re: [web2py] Tip of the day... ajax buttons in grid

2013-03-07 Thread Richard Vézina
What is the purpose? In line edition or something? Richard On Wed, Mar 6, 2013 at 9:09 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Do you know you can do this? > > > db.define_table('thing',Field('name'),Field('active','boolean',default=False)) > > @auth.requires_login() > def

[web2py] Tip of the day... ajax buttons in grid

2013-03-06 Thread Massimo Di Pierro
Do you know you can do this? db.define_table('thing',Field('name'),Field('active','boolean',default=False)) @auth.requires_login() def index(): grid = SQLFORM.grid(db.thing, inks=[lambda row: A('on' if row.active else 'off', _class='btn', _id='t%i'%ro