i have a grid where in a given column i need to calculate the sum. when the grid loads, column 2 is populated per row so there might be a grid like:
id val
1 2
2 4
3 1
i used the grid.attachEvent(“ondataready” to call a function that loops through the rows of the gird above and returns the sum.
the grid also has two cases where the user can update the grid - textbox/button and inline.
textbox/button - when this is clicked i use the grid.collectvalue(2); hoping to get a sum but i don’t get a summation back. i get the row 1 col 2 value of 2.
the inline edit allows me to change a row/col value but how do i get an accurate summation on the entire grid col2?
i tried grid.attachevent(“oneditcell” and oncellchanged but they kept firing per row which didn’t even recalculate the summation - simply returned the first summation.
any suggestions?