"links" is a list so you could add more items to it. links = [lambda row: A(T('action 1'),_href=URL("acontroller ","function1",args=[row.id])), lambda row: A(T('action 2'),_href=URL("acontroller ","function2",args=[row.id, row.field1])), lambda row: A(T('action 3'),_href=URL("acontroller ","function3",args=[row.id, row.field2]))]
Il giorno giovedì 7 giugno 2012 13:25:46 UTC+2, cornelinux ha scritto: > > > Am 07.06.2012 12:46, schrieb Johann Spies: > > On 7 June 2012 11:01, Cornelius Kölbel <cornelius.koel...@lsexperts.de>wrote: > >> Hi, >> is it possible to add more than one button to a SQLFORM.smartgrid? >> >> Yes. > > >> At the moment I would add one button like this... >> links = [lambda row: A(T('Add a contact to this >> customer'),_href=URL("customer","add_contact",args=[row.id]))] >> >> > There will be a button for each item in links if you use links=links in > arguments for SQLFORM.smartgrid. > > Regards > Johann > -- > Because experiencing your loyal love is better than life itself, > my lips will praise you. (Psalm 63:3) > > Hello Johann, > > thanks for your response. > But I'd like to have two buttons per item, and I wonder if this could be > implemented. > At the moment the lambda function returns one link for an item resulting > in one button per item. > > I can not figure out, what to pass, if I want to have several buttons and > I wonder if this is supported at all. > > Kind regards > Cornelius > >