Sum of a Column in the footer

Gerd Huber
how can i get this, i found no example.
Thanks for Information
Posted Feb 23, 2016 Kool
Anthony Amolochitis
I've done it before, but it's been a while.
I used a numeric column type object, and then used the sum property of it to display sum at the bottom.
You may need to post a support ticket for that one
Posted Feb 23, 2016 Kool
"getFooterText" is what you need.
<script type="text/javacript">
function foo()
var _mastertable = grid.getMasterTable();
var _columns = _mastertable.getColumns();
var _first_column = _columns[0];
Posted Feb 29, 2016 Kool
Anthony Amolochitis
On the client side, that will work. There is a footerText property on the column on the server side as well. I believe you may set the value there if you would like the footer to display a sum, average, median, etc...
Posted Feb 29, 2016 , edited Feb 29, 2016 Kool
Gerd Huber
Thank you for your reply.
is there a docu, or an example.
Posted Mar 1, 2016 Kool
Anthony Amolochitis
It's in the documentation. Footer text can be set to what you would like it to be.
Here's the google search I did to find what I wanted from the site : set footer text
Basically, you need to sum the values being displayed. You may need to write a javascript method to loop through the rows and compute a sum, average, median, etc..., on the grid load event.
Posted Mar 1, 2016 Kool
you can try like this:
$column = new GridNumberColumn();
$column->DataField = "Y_2016";
$column->HeaderText = "Y_16";
$column->NullDisplayText = "N/A";
$column->FooterText = "Total Sum2016: ";
$column->Aggregate = "Sum";

$column->DecimalNumber = 0;
$column->ThousandSeperate = "."; // Display 1'000.53 instead of 1,000.53
works perfect with grouping & sorting, sums in footer will be automatically calculated every time you group/sort.
Posted Jun 16 , edited Jul 2 Kool