ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: EPM Solutions on April 16, 2019, 07:34:16 pm
-
Hello Team,
Thanks for your previous reply.
In Pivot mode, Why the unwanted columns are appearing on changing the Summary options by clicking on aggregate pane options in Tool Panel in Pivot Mode?
This issue is coming in pivot mode after applying the groupOption code suggested by yours. I have added a plunker and Image.
Kindly check it and provide a solution as soon as possible.
plunker URL:
https://next.plnkr.co/edit/Ct7jrEcYWOqkY8cT
-
Looking into it.
-
Please use this: replace the type of aggregate in this code as per your requirements.
groupOption: function(evt, ui){
debugger;
var GM = this.option('groupModel'),
obj = {},
newPivot = GM.pivot;
//pivot turned on
if( newPivot && !ui.oldGM.pivot ){
this.getColModel().forEach(function(col){
var di = col.dataIndx;
if(di == "proBudget" || di == 'proOverUnder' ){
col.summary = {type:'all'};
obj[di] = "all";
}
else{
col.summary = {};
}
})
this.Group().option({agg: obj}, false);
//GM.agg = obj;
}
//pivot turned off
else if( !newPivot && ui.oldGM.pivot ){
this.getColModel().forEach(function(col){
var di = col.dataIndx;
col.summary = {type:'all'};
obj[di] = "all";
})
//GM.agg = obj;
this.Group().option({agg: obj}, false);
}
//debugger;
},
https://stackblitz.com/edit/paramquery-pivot?file=index.html