I'm using jqGrid with the jqPivot.
Here my code:
$("#pvtCrewAttendance").jqGrid("jqPivot",
data,
{
footerTotals: true,
footerAggregator: "sum",
totals: true,
totalText: "Sumary",
xDimension: [
{ dataName: "CategoryName", label: "Category Name", sortorder: "desc", footerText: "Row total" },
],
yDimension: [
{ dataName: "ProductName", sorttype: "text", totalHeader: "Total in {0}" },
],
aggregates: [
{ member: "ProductName", aggregator: "count" }
]
},
// grid options
{
iconSet: "fontAwesome",
cmTemplate: { autoResizable: true, width: 80 },
shrinkToFit: false,
autoresizeOnLoad: true,
autoResizing: { compact: true },
pager: false,
rowNum: 20,
width: 420,
height: 100,
rowList: [5, 10, 20, 100, "10000:All"],
caption: "Selling statistic"
}
);
This my plunk demo
I want to sumary quantity of product for each category in the last column.
Any way to do it?