Skip to main content

Grouping Value

  • 2 minutes to read

Data in the ExpressPivotGrid are arranged into categories which are represented by columns and rows. A category is represented by the grouping column or grouping row that corresponds to the grouping value (a unique field value) to represent the aggregate value for each data field within the category.

The column grouping values are displayed along the ExpressPivotGrid‘s top edge and these represent the column headers. The row grouping values are displayed downside the control’s left edge and these represent the row headers. The columns and rows that correspond to the outer fields (outer column fields and outer row fields, respectively) can be expanded/collapsed to create more or less detailed reports.

Each data cell in the data area displays a summary calculated for a subset of records in the control’s underlying data source. All records from this subset have matching values in a column field(s) and row field(s) and these values are identified by the column and row headers.

The values of column fields and row fields can be grouped into larger categories by specifying grouping intervals via a field’s GroupInterval and GroupIntervalRange properties. A grouping value uniquely identifies the grouping interval that a particular field value falls into.

The table below lists the main properties of the pivot grid which affect the appearance and behavior of grouping values.

Contents

A field’s OnGetGroupValueDisplayText event.

Appearance

For column grouping values, the Styles.ColumnHeader property.

For row grouping values, the Styles.RowHeader property.

To dynamically customize these style settings, handle the Styles.OnGetColumnHeaderStyle and Styles.OnGetRowHeaderStyle events, respectively.

Note

These style settings do not modify an element’s background if the pivot grid is painted using the Windows XP (native) or Office2003 style.

Custom Draw Event

For column grouping values, the OnCustomDrawColumnHeader event.

For row grouping values, the OnCustomDrawRowHeader event.

Hints

The OptionsBehavior.GroupHeaderHints property.

The pivot grid’s OnGetCellHint event.

HitTest Information

The HitTest.HitAtGroupHeader property.

See Also