I have checked it and thanks its the thing am looking for however, I have
managed to have it work using SQLFORM.grid, however, I am having a
challenge having it work with SQLFORM.smartgrid where a child table upon
adding or editing a row can trigger a callback, I was trying it like so but
it failed:
db.define_table("person",
Field("first_name"),
Field("last_name"),
plural="People",
singular="Person")
db.define_table("work_experience",
Field("person_id", "reference person"),
Field("company_name"),
Field("start_date", "date"),
Field("end_date", "date"),
plural="Work experience",
singular="Work experience")
def getPerson(form):
session.company_name = form.vars.company_name
def index():
grid =
SQLFORM.smartgrid(db.person,onupdate=dict(work_experience=getPerson),
linked_tables=['work_experience'])
return locals()
On Thu, Mar 14, 2013 at 2:48 PM, Carlos Costa wrote:
> Check oncreate argument.
>
>
> 2013/3/14 Teddy Nyambe
>
>> I want to add logic when a user clicks on submit to add a new record
>> using the SQLFORM.grid, I would like to do something. I have checked the
>> vars and args there is nothing to indicate this only when a form is
>> requested for add, edit, view...
>>
>> --
>>
>> ...
>> Teddy Lubasi Nyambe
>> Opensource Zambia
>> Lusaka, ZAMBIA
>>
>> Cell: +260 97 7760473
>> website: http://www.opensource.org.zm
>>
>> ~/
>> Human Knowledge belongs to the world! - AntiTrust
>>
>> Man is a tool-using animal. Without tools he is nothing, with tools he is
>> all - Thomas Carlyle 1795-1881
>>
>> /~
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Att.
>
> Carlos J. Costa
> Cientista da Computação
> Esp. Gestão em Telecom
>
> EL MELECH NEEMAN!
> אָמֵן
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
...
Teddy Lubasi Nyambe
Opensource Zambia
Lusaka, ZAMBIA
Cell: +260 97 7760473
website: http://www.opensource.org.zm
~/
Human Knowledge belongs to the world! - AntiTrust
Man is a tool-using animal. Without tools he is nothing, with tools he is
all - Thomas Carlyle 1795-1881
/~
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.