On Wednesday, May 31, 2017 at 6:37:53 PM UTC-4, icodk wrote:
>
> Antony
> could you elaborate or give an example of how to use formargs,editargs 
> etc. ?
>

When viewing/creating/updating individual records, the grid creates a 
SQLFORM. You can use formargs, etc. to pass arguments directly to the 
SQLFORM instance generated by the grid -- just put the relevant arguments 
in a dictionary.
 

> You write that it can be used by passing it to SQLFORM but what could be 
> the actual use of it?
> In another post 
>
> https://groups.google.com/forum/#!searchin/web2py/formargs$20field$20order%7Csort:relevance/web2py/cxaHVL__3rc/lP6pGH_u614J
>
> Niphlod get a bit closer to a use example by specifying  editargs to 
> reorder fields on an edit form. For the first it works  on grid but not on 
> smartgrid, why ?
>

The smartgrid can display forms for multiple tables, so many of its 
arguments should actually be dictionaries with individual table names as 
the keys, and then the arguments for each table as the values. So, for 
smartgrid, you would have something like:

SQLFORM.smartgrid(..., formargs={'table1': dict(...), 'table2': dict(...), 
...})

Anthony

-- 
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/d/optout.

Reply via email to