/
/
AggregateRow

This sample demonstrates aggregate functionality of the TreeGrid. In this sample, the aggregate value for the columns “Total Units” and “Unit Weight” is displayed in column footer and provide an option to show child summary.

More Details...

Loading....
Description

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 the customAggregate property to perform aggregation. The custom aggregate value can be accessed inside template using the key ${'custom'}

In this demo, the footerTemplate property is used to display three different aggregates in the TreeGrid footer.

  • Showing minimum aggregate for “Total Units” column and the footerTemplate using its type name as (${'Min'}).
  • Showing average aggregate for “Unit weight column” column and the footerTemplate using its type name as (${'Max'}).

The template expression should be provided inside ${'...'} the interpolation syntax.

Injecting Module:

TreeGrid features are segregated into individual feature-wise modules. To use aggregate feature, we need to inject Aggregate module into the services.

More information about aggregate can be found in this documentation section.