Here is the Example created - Pivot Table JSFiddle example: here
Here are my grid options used:
{
cmTemplate: { autoResizable: true },
autoResizing: { compact: true },
width: "600",
height: "auto",
rowNum: 10,
iconSet: "fontAwesome",
pager: true,
caption: "Employee YTD Summary",
groupingView: {
groupColumnShow: [false],
groupDataSorted: true,
groupOrder: ["desc"]
},
onInitGrid: function () {
var p = $(this).jqGrid("getGridParam"),
userdata = p.datastr.userdata;
p.data = $.grep(p.datastr, function (item) {
return item.ComponentType !== "";
});
p.userData = userdata;
p.datatype = "local";
},
footerrow: true
}
Need help in Ignoring specific row's/groups in adding from colTotals
summary
This is the part of grid I have from above example
At footer of this Image colTotals
section shows sum of all columns, In here I am unable to exclude the groups Benefit
and AD
from being summed.
expected sum at colTotals
Working days, LOP, Benefits rows should not be summed (as they are not required) in summary column which is at bottom (red mark)
How to ignore complete group of AD
and Benefit
values in colTotals
summary
of jqGrid.
Thanks
It looks like you want to make custom calculation of the values in the total summary rows. In the You can for example remove
colTotals: true
parameter. It makes only the standard calculation of the sum of all elements. Instead of that you can adduserDataOnFooter: true
option, calculate the custom summary inside ofonInitGrid
and to place the results inuserdata
. The code can looks like the followingYou can see the results on the modified data: https://jsfiddle.net/OlegKi/bkqce0s0/14/