Ah OK great. I'll have to raise a github request then.
On 17 Feb 2016 20:15, "Anthony" <[email protected]> wrote:

> Hmm, doesn't appear to support all of the grid arguments:
>
> for key in
> 'columns,orderby,searchable,sortable,paginate,deletable,editable,details,selectable,create,fields'
> .split(','):
>
> Maybe make a feature request on Github to include all of the grid
> arguments, not just those above.
>
> Anthony
>
> On Wednesday, February 17, 2016 at 11:48:49 AM UTC-5, Seraaj Muneer wrote:
>>
>> Hello everyone, according to the Book, the smartgrid can be passed a map
>> of parameters, eg searchable=dict(parent=True, child=False), and this will
>> be passed to the appropriate grids that the smartgrid creates.
>>
>> Now I am wondering how to pass an onvalidation call back to both a parent
>> and a child. Here's my code
>>
>> def documents():
>>     response.title = 'Employee Documents '
>>
>>     get_default_company_id() or redirect(URL('company', 'companies'))
>>     grid = SQLFORM.smartgrid(db.employee, deletable=False, 
>> linked_tables=['employee_document'], csv=False,
>>                              orderby=dict(employee=db.employee.last_name,
>>                                           
>> employee_document=db.employee_document.document_type),
>>                              onvalidation=dict(employee=on_validate, 
>> employee_document=on_validate_doc),
>>                              showbuttontext=dict(employee=False, 
>> employee_document=False)
>>                              )
>>     return dict(grid=grid)
>>
>>
>> but this results in an error
>>
>>
>> <type 'exceptions.RuntimeError'> Invalid key in onvalidate dict
>>
>> If I remove the onvalidation part from the above code, it runs fine.
>>
>> So my question again is, how do I pass a function to be called for 
>> onvalidation for a child grid created from a smartgrid? 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/WG28up_5YCs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

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