Here is how I'm handling it:

    grid = SQLFORM.grid(query,fields=fields,create=False,editable=False,
                        details=False,deletable=False,csv=False,
                        searchable=False, orderby=orderby,
                        selectable=lambda ids:redirect(URL('applications',
                                                        'quickOrderConfirm',
                                                        vars=dict(ids=ids
))),
                        maxtextlength=256,paginate=256)


Then in my applications/quickOrderConfirm function I use the following to 
grab the ids:

    feedOrderHistoryIds = []


    if type(request.get_vars.ids) == type('str'):
        feedOrderHistoryIds.append(request.get_vars.ids)
    else:
        for id in request.get_vars.ids:
            feedOrderHistoryIds.append(id)


Isn't the prettiest code, but it is working for us.

-Jim


On Friday, June 21, 2013 2:00:43 AM UTC-5, PremKumar KrishnaKumar wrote:
>
> Hi,
> I am trying out webapp development using web2py and need your direction in 
> finding a solution
>
> I use links to display a check-box in sqlform.grid and in the form I have 
> a button.
>
> links = [dict(header='Actioned',body=lambda row: 
> INPUT(_name='action',_type='checkbox'))]
>
> Once I click the button I wanted to retrieve all the ids and flag and if 
> it is checked update to 1 else 0.
>
> Unfortunately i couldn't figure how to access the values also I don't want 
> to call a controller function for every row but instead wanted to do it for 
> all records displayed in the grid.
>
> Would appreciate any direction that you could provide
>
>
>
>
>

-- 

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