Hi,
I have multiple groups in my jqxgrid. where I could add grand total for each column. but unable to add toal for groups. Following is my code for creating columns. I have tried “group aggregate” but it is not working
for (var iMonth = 0; iMonth < month.length; iMonth++) {
var monthColumns = {}
//var _aggregates = [{
// '<b>Total</b>':
// function (aggregatedValue, currentValue, column, record) {
// var sumPrice = $(curGridId).jqxGrid('getcolumnaggregateddata', month[iMonth] + iMonth.toString(), ['sum']);
// return sumPrice.sum;
// }
//}];
monthColumns['text'] = month[iMonth];
monthColumns['datafield'] = month[iMonth] + iMonth.toString();
monthColumns['map'] = iMonth.toString();
monthColumns['width'] = 125;
monthColumns['cellsalign'] = 'Right';
monthColumns['aggregates'] = ['sum'];
monthColumns['cellsrenderer'] = _cellsrenderer;
//monthColumns['aggregatesrenderer'] = _aggregates;
monthColumns['cellsformat'] = 'c2';
monthColumns['draggable'] = false;
monthColumns['cellclassname'] = cellclass;
monthColumns['cellvaluechanging'] = cellvaluechanging;
//monthColumns['columntype'] = 'numberinput';
finalArray.push(monthColumns);
}