ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: EPM Solutions on February 26, 2020, 02:23:03 pm
-
Hello Team,
Our requirement:
We have added check box in each row of grid-
On checked : The intent of checkbox is to set 0 value of certain checked projects and update the row summary aggregations of all row group level or update the summary row excluding the values of checked project.
On unchecked : return original value and updated the row summary aggregations as initial or update the summary row as the original values project for all row group level.
Here below I have added a snippet (In on check/uncheck: it is setting value to zero and regaining original but not updating the summary row).
Can You please help us to do it? Please check and reply asap.
Problem URL:
https://next.plnkr.co/edit/K85Ne6vMTGPvhj46?preview
-
First write custom aggregate to exclude checked rows.
agg.sumCustom = function(arr, col, rows){
var vals = arr.filter(function(val, i){
return rows[i].pq_group_cb != true
})
return agg.sum(vals, col);
}
then recalculate summary in check event.
check: function(evt, ui){
this.Group().summaryT();
},
https://next.plnkr.co/edit/oiEqNlBmXgzk6xNx?preview
-
Hello Team,
Amazing,
Thank you for your quick response.
And check the below case and please update on same
Case URL: https://paramquery.com/forum/index.php?topic=3461.0
-
There is no solution for that one currently.