ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: mikep on March 24, 2023, 09:32:37 pm

Title: Change Grouping Summary type
Post by: mikep on March 24, 2023, 09:32:37 pm
If I'm grouping by a certain field, I want a field's summary to be sum, otherwise I want it to be avg (summary: { type: "avg" }).
How would I accomplish this?

Title: Re: Change Grouping Summary type
Post by: paramvir on March 27, 2023, 12:50:50 pm
You can use groupChange event to detect grouping by certain field and set field summary accordingly.

Code: [Select]
groupChange: function(){
alert( this.option('groupModel.dataIndx') );
},