Hi guys,
I have a grid with subcolumns where I need to calculate a total.
For example I have a column Sunday and 2 subcolumns: Hours and Units. How do I calculate the sum for "Hours" and "Units"?
It seems like the callback function hasn't been called at all. I don't see any alerts showing.
I was trying to do something like:
var colM=$grid.pqGrid( "option", "colModel");
var colSubModel = colM[6].colModel;
colM[0].summary = {
type: [function( arr ){
alert("Summary Calc");
eval(arr.join("+"));
return "Join: "+ arr.join(",");
}
],
title: [ "Total: {0}", "Join: {0}" ]
};
$grid.pqGrid("option","colModel",colM);