Example of Custom Aggregate in ASP.NET Core Tree Grid Control
This sample demonstrates custom aggregate functionality of the TreeGrid. In this sample, the custom aggregate value for the columns "Category" is displayed in column footer with dropdown to display the count of selected category name.
The TreeGrid supports aggregates which will be displayed at the footer and every hierarchy level.
The aggregate configurations can be provided by the Aggregates
property.
The built-in aggregates are,
Sum
Average
Min
Max
Count
TrueCount
FalseCount
-
Custom
- Requires theCustomAggregate
property to perform aggregation. The custom aggregate value can be accessed inside template using the key${Custom}
In this demo, the footerTemplate property shows the custom aggregate value for the columns “Category” in column footer to display the count of category name.
The template expression should be provided inside ${...}
the interpolation syntax.
More information about aggregate can be found in this documentation section.