Aggregation

ZingGrid has default behaviors for calculating the average, count, min, max, and sum values for a given column. These aggregation values are displayed in a single row at the base of the grid.

Average

Display the average of a column's values in the footer, like so:

<zg-column index="exampleIndexName" foot-cell="avg"></zg-column>

Average Calculated Grid

Here is a complete grid with the average of each column calculated in the grid's footer:

Top

Count

Display the count of a column's items (i.e., the number of rows containing data) in the footer, like so:

<zg-column index="exampleIndexName" foot-cell="count"></zg-column>

Count Calculated Grid

Top

Min

Display the minimum value of a column in the footer, like so:

<zg-column index="exampleIndexName" foot-cell="min"></zg-column>

Min Calculated Grid

Top

Max

Display the maximum value of a column in the footer, like so:

<zg-column index="exampleIndexName" foot-cell="max"></zg-column>

Max Calculated Grid

Top

Sum

Display the sum total of a column's values in the footer, like so:

<zg-column index="exampleIndexName" foot-cell="sum"></zg-column>

Sum Calculated Grid

Here is a complete grid with the sum total of each column calculated in the grid's footer:

Top

Related Resources

Here are some extra resources related to this feature to help with creating your grid:

Top