如何为 koGrid 创建页脚模板以显示列的总和?
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 },
]
}
在这里,我想在页脚中将“价格”字段的总和打印为总计。我该如何实现?