It's a bug: https://github.com/web2py/web2py/issues/1351. Unfortunately, I 
think the only workaround is to create a dictionary with a key for each 
table that might be linked to your parent table:

ui = dict(widget='', ...)
tables = ['citizen', 'country', ...]
grid = SQLFORM.smartgrid(db.citizen, ui={table: ui for table in tables})

Anthony

On Wednesday, October 12, 2016 at 11:31:51 AM UTC-4, Luciano Laporta 
Podazza wrote:
>
> Hello!
>
> I tried to apply some css classes to smartgrid elements with no success. 
> It seems that smartgrid ignores ui argument but grid does
>
> my controller:
>
> def index():
>     """
>     example action using the internationalization operator T and flash
>     rendered by views/default/index.html or views/generic.html
>
>
>     if you need a simple wiki simply replace the two lines below with:
>     return auth.wiki()
>     """
>     form = SQLFORM.smartgrid(db.citizen, user_signature=False,
>             ui = dict(widget='',
>                header='',
>                content='',
>                default='',
>                cornerall='',
>                cornertop='',
>                cornerbottom='',
>                button='btn btn-default button',
>                buttontext='buttontext button',
>                buttonadd='glyphicon glyphicon-plus space-after 
> btn-primary',
>                buttonback='glyphicon glyphicon-arrow-left space-after',
>                buttonexport='glyphicon glyphicon-download space-after',
>                buttondelete='glyphicon glyphicon-trash space-after',
>                buttonedit='glyphicon glyphicon-pencil space-after',
>                buttontable='glyphicon glyphicon-arrow-right space-after',
>                buttonview='glyphicon glyphicon-arrow-zoom-in space-after'
> ))
>     return dict(form=form)
>
>
> If I change some css class names, smartgrid ignores them and uses the 
> default ones. But if I use grid instead of smartgrid, css changes takes 
> effect.
>
> How can I use ui argument on smartgrid too?. Thanks in advance!
>
> P.S.: I'm using web2py 2.14.6-stable+timestamp.2016.05.10.00.21.47
>

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

Reply via email to