$(function () { // Set groupAggregate event handler function $(".selector").wijgrid({ groupAggregate : function (e, args) { } }); });
Parameters
- e
- The jQuery.Event object.
- args
- The data with this event.
$(function () { // Set groupAggregate event handler function $(".selector").wijgrid({ groupAggregate : function (e, args) { } }); });
// This sample demonstrates using the groupAggregate event handler to calculate an average in a custom aggregate: $("#element").wijgrid({ groupAggregate: function (e, args) { if (args.column.dataKey == "Price") { var aggregate = 0; for (var i = args.groupingStart; i <= args.groupingEnd; i++) { aggregate += args.data[i].valueCell(args.column.dataIndex).value; } aggregate = aggregate/ (args.groupingEnd - args.groupingStart + 1); args.text = aggregate; } } });