Example of undefined in React Grid Component

/
/
AggregateDefault

This sample demonstrates aggregate functionality of the Grid. In this sample, the aggregate value for the column “Freight” is displayed in column footer.

More Details...

Loading....
Description

The Grid supports aggregates which will be displayed at the footer, group footer and group caption of the Grid. 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 four different aggregates in the Grid footer. In the first aggregate row, the sum aggregate type is used by setting the type and field property as Freight which will be used to perform the aggregation. The aggregate value is accessed inside the footerTemplate using its type name (sum). The aggregate value will be formatted based on its format value(C2) before being displayed.

Injecting Module:

Grid component features are segregated into individual feature-wise modules. To use aggregate feature, we need to inject Aggregate into the provide section.