I'm able to change the summary type when the grouping column changes using the groupChange below.
groupChange: function () {
var GMDI = this.option('groupModel.dataIndx');
if (GMDI.indexOf('res') == 0 ) {
this.getColumn({ dataIndx: '% Allocate' }).summary = { type: 'sum' };
}
else {
this.getColumn({ dataIndx: '% Allocate' }).summary = {};
}
}
How would i implement similar logic after I apply a grid state: $gridMain.pqGrid("loadState", { state: result }, false);
//now set the summary type for columns, based on grouping in the state