Search code examples
kendo-ui-angular2kendo-ui-grid

kendo ui grid angular 2 footer template


how to display the sum of a column in the footer of kendo grid for angular 2. i tried using the aggregateBy method like this

public sumUnitPrice() {
    return aggregateBy(this.gridView.data, [{ aggregate: "sum", field: "UnitPrice" }]);
}

but in the footer how to call this function


Solution

  • There is an example how to use footerTemplate directive.

    Similarly you can show the result of the aggregateBy function in the footer template - http://plnkr.co/edit/p8LpBRZmDO5jrhZ5U91w?p=preview