It is possible to use grid or smartgrid without any table?

Le samedi 7 septembre 2013 20:34:01 UTC+2, Massimo Di Pierro a écrit :
>
> Something like this?
>
> def parse(table,d):
>    return reduce(lambda a,b:a&b,[table[k]==v for k,v in d.iteritems()])
>
> SQLFORM.smartgrid(parse(db.yourtable, {'name':'alex', 'age':'55'}))
>
>
>
>
>
> On Saturday, 7 September 2013 11:07:31 UTC-5, keiser1080 wrote:
>>
>> hi,
>>
>> It is possible tu use smartgrid with a list of dictionary in place of a 
>> query?
>> Can i do something like this?
>>
>> smartgrid<http://www.web2py.com/examples/static/epydoc/gluon.sqlhtml.SQLFORM-class.html#smartgrid>
>> (table, constraints=None, linked_tables=None, links=None, links_in_grid=
>> True, args=None,user_signature=True, divider='>', breadcrumbs_class='', 
>> **kwargs)
>>
>> smartgrid([{'name':'alex', 'age':'55'},  {'name':'albert', 'age':'44'}])
>>
>>
>>
>>
>>
>>
>>

-- 

--- 
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.

Reply via email to