• Material
  • Fabric
  • Bootstrap
  • Bootstrap v4
  • High Contrast
Theme Selection
Mode Selection
Essential JS 2
All Controls


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 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 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.