Thanks a lot Massimo, web2py for president. Ciao.
Il giorno giovedì 28 novembre 2013 14:31:56 UTC+1, Massimo Di Pierro ha
scritto:
>
> {{if grid.view_form:}} # So here is my single row view
> # How can I call fields ? Like this:
> grid.view_form.record.code
> grid.view_form.record.description
> grid.view_form.record.brand
> grid.view_form.record.pdf_path
> {{else:}}
> {{=grid}}
> {{pass}}
>
> On Thursday, 28 November 2013 02:08:48 UTC-6, Gael Princivalle wrote:
>>
>> Hi.
>>
>> I've saw here how is it possible to customize a single row view from a
>> sqlform.grid:
>>
>> https://groups.google.com/forum/#!search/single$20datable$20record$20formatting/web2py/jZ1nkcIUcKc/EpvAuAL_VXYJ
>>
>> What I don't know is how calling single row data.
>> For example you have this sqlform.grid in the controller:
>> def products_listing():
>> fields =
>> (db.products.code,db.products.description,db.products.brand,db.products.pdf_path)
>> grid = SQLFORM.grid(db.products, fields=fields)
>> return dict(grid=grid)
>>
>> And in the view:
>> {{if request.args and request.args[-3] == 'view':}} #So here is my single
>> row view
>> #How can I call fields ?
>> db.products.code
>> db.products.description
>> db.products.brand
>> db.products.pdf_path
>> {{else:}}
>> {{=grid}}
>> {{pass}}
>>
>> Thanks.
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.