## Grouping and Aggregates

This sample shows how to use the groupInfo and aggregate options to create grouping within wijgrid.

The groupInfo option determines whether groups should be created for the column, as well as the appearance, position, and content of the group header and group footer rows.

This sample groups orders by country. Notice that the Country column has the visible option set to false. Because the grid already shows the country in the group headers, there is no need to repeat that information in the data rows.

The aggregate option determines the type of aggregate that should be calculated for this column and included in the group header and footer rows (the Quantity and Discount columns show the sum and maximum values for the group).