Re: [web2py] Re: Grid/Smartgrid: how to use the 'selectable' option?

2012-02-10 Thread Fabiano Faver
I had this same doubt and this thread have helped as there is no 
explanation on online book.
But I want to make the rows selectable to allow user to update all them 
toguether.

I have no clue how to edit the submit button that shows at the end of the 
table when selectable is active.
Any tips?


Re: [web2py] Re: Grid/Smartgrid: how to use the 'selectable' option?

2011-10-18 Thread Johann Spies
Thanks!
Johann


-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)


[web2py] Re: Grid/Smartgrid: how to use the 'selectable' option?

2011-10-18 Thread Massimo Di Pierro
selectable should be None (nothing to do) or a function like

selectable = lambda ids: do_something(ids)

where ids is the list of selected ids.

On Oct 18, 2:49 am, Johann Spies  wrote:
> The default value for 'selectable' is None.
>
> When I use 'selectable = True' the an option button appears to every record,
> but when submitted I get
>
>   File "/home/js/web2py/gluon/sqlhtml.py", line 1821, in grid
>     selectable(records)
> TypeError: 'bool' object is not callable
>
> So if what should 'not None' be?  And what will be the result of the submit
> of the selected records?
>
> Regards
> Johann
> --
> Because experiencing your loyal love is better than life itself,
> my lips will praise you.  (Psalm 63:3)