PDA

View Full Version : Can I get grid´s summary value?



mvosantos
11 Oct 2012, 10:56 AM
Hello guys.
I have a grid column with columnType: 'sum' that is returning the record´s total value.
Is there any way to get this grid summary value?

scottmartin
12 Oct 2012, 5:10 AM
See if the following will help:
http://jsfiddle.net/RMfzF/

Scott.

mvosantos
12 Oct 2012, 6:35 AM
On this example, on first month you have a summary Total of 600, the second one a summary total of 300.

How can I get one of those summaries and place on a textfield?

scottmartin
12 Oct 2012, 8:05 AM
You can get the total column from the grid.store as data.

As for the summary row, it seems the row is simply rendered. You could grab it from the summaryRenderer fuction (summaryData object) and access from grid.table.dom section.

http://jsfiddle.net/RMfzF/1/

Scott.