How can I create footer Template for a koGrid to display sum of a column?
gridOptions : {
displaySelectionCheckbox: false,
data: items,
// selectedItems: self.selectedItems,
multiSelect: false,
enableColumnResize: true,
columnDefs: [
{ field: 'fun_id', displayName: 'fun_id', visible: false },
{ field: 'test', displayName: 'Test' },
{ field: 'details', displayName: 'Details'},
{ field: 'qty', displayName: 'Qty' },
{ field: 'price', displayName: 'Price' },
{ field: 'discount', displayName: 'Discount' },
{ field: 'empno', displayName: 'EmpNo' },
{ field: 'promo', displayName: 'Promo' },
{ field: 'Delete', cellTemplate: myCellTemplate, width: 60 },
]
}
Here I want to print the sum of 'price' field as Total in Footer.How can I achieve this?
From looking at the Kendo aggregation demo all you need to do is define an aggregate property