The body of a links item is HTML that will get inserted in the grid for 
that row. The function (which doesn't have to be a lambda) is called when 
the grid is generated. It sounds like maybe you instead want something to 
happen when the link is clicked. Can you explain what exactly you are 
trying to do?

On Thursday, February 12, 2015 at 8:07:21 PM UTC-5, Alex Glaros wrote:
>
> do you need to have a URL redirect in order to have a grid lambda do 
> something?
>
> can you do anything within the grid lambda itself?
>
> E.g.
>
> potentialEmailRecipientsQuery = ((auth.user_id == 
> db.VerifiedConnection.personID) & (db.auth_user.id == 
> db.VerifiedConnection.connectedTo))
> arglist=[]
> grid = SQLFORM.grid(potentialEmailRecipientsQuery,  links = 
> [dict(header='Choose this message recipient',  body=lambda row: 
> A('add',_class="btn", arglist.append(row.id))))]) ## instead of URL 
> redirect, trying to append new value within the lambda
>
> all examples I've seen redirect to other URL to do the processing.  I'd 
> like to stay within function in order to build email recipient list into 
> arglist.
>
> above errors with non-keyword arg after keyword arg
>
> thanks
>
> Alex Glaros
>

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