var instance; // Type: wijmo.grid.IDetailSettings; var value; // Type: any value = instance.groupAggregate;
var groupAggregate : any;
The groupAggregate event handler is a function that is called when groups are being created and the column object's aggregate option has been set to "custom". This event is useful when you want to calculate custom aggregate values.
var instance; // Type: wijmo.grid.IDetailSettings; var value; // Type: any value = instance.groupAggregate;
var groupAggregate : any;
// 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; } } });