This sample demonstrates custom aggregate functionality of the Tree Grid. 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.
S.NO | Shipment Name | Category | Total Units | Unit Price($) | Price($) |
---|---|---|---|---|---|
No records to display |
The Tree Grid 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 the customAggregate
property to perform aggregation. 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.
Injecting Module:
Tree Grid component features are segregated into individual feature-wise modules. To use aggregate feature, we need to inject AggregateService
into the @NgModule.providers
section.
More information about aggregate can be found in this documentation section.