Good idea, thank you!

2013/10/21 Cliff Kachinske <cjk...@gmail.com>

> For question #1, parse the request.args. I use the following with
> smartgrid, but grid should work similar:
>
> def index():
>     fields = None # Shows all fields
>     if len (request.args) > 2 and request.args = ['sometable', 'new',
> 'sometable']
>         fields = [db.sometable.this, db.sometable.that,
> db.sometable.the_other]
>     elif len(request.args) > 3 and request.args(0) == 'sometable' and \
>               request.args(1) == 'edit' and request.args(2) == 'sometable':
>         fields = [#some list of fields you want to show on edit
>                     ]
>     elif # other sets of request.args
>     else: # falls through to the list of items in the table
>         fields = [# the list of fields you want to show on the parent grid
>                     ]
>     form = SQLFORM.grid(db.sometable, fields=fields ...#
>     return dict(form=form)
>
>
> On Sunday, October 20, 2013 8:26:26 AM UTC-4, mweissen wrote:
>>
>> Hi,
>>
>> I have a SQLFORM.grid with details=True. A click on the "details"-ikon
>> (the magnifier) shows another TABLE or SQLFORM.
>>
>> Two problems:
>>
>> (1) I have one column with a lot details, which should not be visible in
>> the grid, but should be visible in the second table/sqlform.
>>
>> (2) I want to have even/odd colored rows: the grid shows two colors as
>> background, the table only one.
>>
>> Any ideas?
>> Regards, Martin
>>
>>  --
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to