Hi,
@auth.requires_login()
def index():
response.view = 'Final/pricelist.html'
form = SQLFORM.smartgrid(db.sourcelist,linked_tables=['itemowner'],
deletable=dict(sourcelist=False,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]))]),oncreate=dict(itemowner=[avgprice
]),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!
--