Hi Johan, All,
Sorry but I am not able to get it. With your code above I get
an invalid controller. I understand that we can add custom buttons
with their functions in the controller to the grid. That I am able to
do but, I would like to know what changes would I have to do if -
1. I want to use existing facility provided by SQLForm.grid (View or
other button) but the button's label must be something like "View
Post", "Delete me" etc
2. Also I would like to know the complete syntax for SQLForm.grid
parameters -
Syntax for -
form= SQLFORM.grid (...whatever/everything that we can specify
here..)
Currently I am using/aware of below parameters:
form = SQLFORM.grid( query=query, fields=fields, headers=headers,
orderby=default_sort_order, links=links, create=False,
deletable=False, editable=False, csv=False, maxtextlength=64,
paginate=20 )
Thanks and Regards, Rahul
(www.flockbird.com - web2py powered)
On Nov 17, 12:05 pm, Johann Spies <[email protected]> wrote:
> On 17 November 2011 08:57, Rahul <[email protected]> wrote:
>
>
>
> > How can I make it use existing functions (that are there by default
> > SQLForm.grid) associated with View, Edit and Delete (CRUD)'s ?
>
> Some time ago I have asked the same question and got the following answer
> form [email protected]:
>
> You can add your own buttons using:
>
> links = [lambda row: A('Edit',_href=URL("controller","edit",
> args=["update", tablename, a.id]))
>
> and set editable, deletable, details to False.
>
> Regards
> Johann
> --
> Because experiencing your loyal love is better than life itself,
> my lips will praise you. (Psalm 63:3)