something like:

def myondelete(table, row_id):
 ....
 pass

form = SQLFORM.smartgrid(..., ondelete=myondelete, ...)



On Sunday, October 28, 2012 6:57:12 AM UTC-7, vivek wrote:
>
> So how would the new code be? I am a newbie a bit of direction needed!
>
>
>
>
> On Sun, Oct 28, 2012 at 5:39 PM, Niphlod <[email protected] 
> <javascript:>>wrote:
>
>> oncreate, ondelete, onupdate are callbacks to functions, not dicts....
>>
>>
>> On Sunday, October 28, 2012 12:26:39 PM UTC+1, vivek wrote:
>>>
>>> Hi,
>>>
>>> @auth.requires_login()
>>> def index():
>>>     response.view = 'Final/pricelist.html'
>>>     form = SQLFORM.smartgrid(db.sourcelis**t,linked_tables=['itemowner'
>>> ],**deletable=dict(sourcelist=Fals**e,itemowner=True), editable=dict(
>>> sourcelist=False**,itemowner=True), details=dict(sourcelist=False,**
>>> itemowner=False),links = dict(project=[lambda row: A(SPAN(_class=
>>> 'icol-find'),_**href=URL("sourcelist","**itemowner",args=[row.id]))]),o*
>>> *ncreate=dict(itemowner=[avgpri**ce]),ondelete=dict(itemowner=[**
>>> 'avgprice'])) 
>>>     return dict(form=form)
>>>
>>> @auth.requires_login()
>>> def avgprice():
>>> .......
>>>
>>> The above is my code . "itemowner" is my child table. I have manually 
>>> tried running avgprice() from appadmin to make sure it works. There wasnt 
>>> an issue. I just need to get the smartgrid to trigger avgprice.
>>>
>>> Thanks!
>>>
>>>  -- 
>>  
>>  
>>  
>>
>
>

-- 



Reply via email to