Search results

Aggregates in Angular Grid component

18 May 2022 / 1 minute to read

Aggregate values are displayed in the footer, group footer and group caption of Grid. It can be configured through e-aggregates directive. The field and type are the minimum properties required to represent an aggregate column.

To use aggregate feature, you need to inject the AggregateService module into the @NgModule.providers section.

By default, the aggregate value can be displayed in footer, group and caption cells, to show the aggregate value in any of these cells, use the footerTemplate, groupFooterTemplate and groupCaptionTemplate properties.

Built-in aggregate types

Aggregate type must be specified in type property to configure an aggregate column.

The built-in aggregates are,

  • Sum
  • Average
  • Min
  • Max
  • Count
  • TrueCount
  • FalseCount
  • Multiple aggregates can be used for an aggregate column by setting the type property with an array of aggregate type.
  • Multiple types for a column is supported only when one of the aggregate templates is used.

See Also