On Sunday, April 14, 2019 at 6:25:10 AM UTC-7, mostwanted wrote:
>
> I was wondering if there is a way to add up values in a desired 
> SQLFORM.grid column? and if there is how is it performed?
>
> Mostewnted
>

Is this in response to pressing a button, perhaps labeled "Total"?

I'd look at an Ajax request using sum() in the query, and specifying the 
desired field within the parens of the select.  You'd have to pass the 
filed name in the Ajax URL.

If your grid is small, it might be just as easy to add it up on the client 
with jscript.  As the grid grows, at some point the speed of the DB 
outweighs the time for the request.

/dps
 

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