ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Mendrace on June 10, 2016, 01:30:22 am

Title: Edit grandSummaryData after loading or filtering
Post by: Mendrace on June 10, 2016, 01:30:22 am
I have a grid with remote data. For some columns, I use the auto summary function (summary: {type: "sum"}). The group model I use with the setting "grand summary: true".

Is it possible to edit the content of the summary row for specific columns after loading or filtering?
Title: Re: Edit grandSummaryData after loading or filtering
Post by: paramvir on June 10, 2016, 07:05:08 pm
There are various ways and choice depends upon what kind of update you want to make in auto grand summary row:

1) If it's an aggregate, then consider to use inbuilt aggregates or create your own aggregate by extending pq.aggregate and use it in column.summary.type

2) If it's formatting or textual change, use rowInit to make a change:

Code: [Select]
rowInit: function(ui){
        var rd = ui.rowData;
if( rd.pq_grandsummary ){
rd.ContactName = "Hello World";//make your change here.
}
},

3) use of column.render callback to make a change similar to rowInit callback.
Title: Re: Edit grandSummaryData after loading or filtering
Post by: Mendrace on June 12, 2016, 03:08:45 pm
Ok. Thank you for your help  :)