Yes. In the view, instead of

{{=rows}}

do

{{=SQLTABLE(rows,headers=....)}}

On Nov 2, 5:43 am, demetrio <dgzabal...@gmail.com> wrote:
> Hi, first of all sorry if I made any mistake in english :)
>
> When i try to make a crud.search(), i can customize the names of the
> search form, but i cant do the same with the results' headers.
>
> def search():
>     db.licenses.id.represent = lambda id: \
>         DIV(A('edit',_href=URL(r=request, f='update', args=(id)))," ",
> A('read',_href=URL(r=request, f='read', args=(id))),"
> ",A('delete',_onclick="return confirm('" + T("Are you sure to delete?")
> +"')",_href=URL(r=request, f='delete', args=(id))))
>     form, rows = crud.search(db.licenses, field_labels =
> {'id':'ID','name':'Name'})
>     return dict(form=form, rows=rows)
>
> With this, code my form is something like:
>
> <checkbox> ID <select> <input>
> <checkbox> Name <select> <input>
>
> but my results table is:
>
> licenses.id                licenses.name
> --------------------------------------------------
> edit read delete         resultname1
> edit read delete         resultname2
> edit read delete         resultname3
>
> Do you know if there is any posibility to customize that header
> names?,
>
> it will be nice if I could use the "headers" parameter like in the
> crud.search() method because you can do something like this modifying
> the represent of the id
>
> Search Form:
> <checkbox> **ID** <select> <input>
> <checkbox> Name <select> <input>
>
> Results:
>
> **Actions**                    Name
> --------------------------------------------------
> edit read delete         resultname1
> edit read delete         resultname2
> edit read delete         resultname3
>
> notice that the field licenses.id in the form is named **ID**, and in
> the results is named **Actions**
>
> Thats all, thanks in advance :)

Reply via email to