Re: [web2py] Re: Detect change in sqlform.grid

2013-01-30 Thread Massimo Di Pierro
You have grid = SQLFORM.grid(...,editargs={'onvalidation':x},..) def x(form): #dbg.set_trace() print "in x" the edi

Re: [web2py] Re: Detect change in sqlform.grid

2013-01-28 Thread Keith Edmunds
Sorry to bump: can anyone give me a pointer on this? Thanks. On Sun, 27 Jan 2013 09:02:45 +, k...@midnighthax.com said: > On Sat, 26 Jan 2013 13:05:50 -0800 (PST), niph...@gmail.com said: > > > grid takes formargs={}, createargs={}, editargs={} > > Thanks. I'm sorry if I'm being a bit slow

Re: [web2py] Re: Detect change in sqlform.grid

2013-01-27 Thread Keith Edmunds
On Sat, 26 Jan 2013 13:05:50 -0800 (PST), niph...@gmail.com said: > grid takes formargs={}, createargs={}, editargs={} Thanks. I'm sorry if I'm being a bit slow here, but I *still* can't get what I want to work. I've tried:

Re: [web2py] Re: Detect change in sqlform.grid

2013-01-26 Thread Niphlod
once you get what you want with SQLFORM(), pass arguments to the grid is easy: grid takes formargs={}, createargs={}, editargs={}, that are passed, respectively, to all forms, only the create form, only the edit form --

Re: [web2py] Re: Detect change in sqlform.grid

2013-01-26 Thread Keith Edmunds
Thanks Massimo, but I'm struggling with how to apply this as I don't ever process the form. I'm doing: grid = SQLFORM.grid(...) return dict(grid=grid, ...) How would I hook into the grid's process() function? > SQLFORM(...).process(...) > > takes two callback functions > > process(onvalidatio

[web2py] Re: Detect change in sqlform.grid

2013-01-25 Thread Massimo Di Pierro
SQLFORM(...).process(...) takes two callback functions process(onvalidation=lambda form:, onaccept=lambda form:) on validation is called when form is submitted, passes validation, and before the database is updated. On Friday, 25 January 2013 17:16:40 UTC-6, backseat wrote: > > I have