Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Populate Pivot Grid Fields with Data

  • 2 minutes to read

You can supply fields with data in the following ways when Pivot Grid operates in Legacy and LegacyOptimized modes:

  • Pivot Grid fields retrieve data from the data source columns. These fields are called bound fields.
  • Pivot Grid fields are bound to the result of the calculated expression. These fields are called unbound fields.

You can sort, group, and filter unbound fields in the same manner as bound fields. These fields are called unbound fields.

#Create Bound Fields

Pivot Grid uses the PivotGridField.FieldName property to bind a data source column to a Pivot Grid field.

Follow the steps below to create a Pivot Grid field and bind it to data.

  1. Create a Pivot Grid field and add it to the PivotGridControl.Fields collection.

  2. Assign the data source column to the field’s FieldName property.

Refer to the following article for information on how to populate fields with data in Optimized mode: Bind Pivot Grid Fields to Data Columns.

#Create Unbound Fields

Follow the steps below to create a Pivot Grid field and bind it to data.

  1. Create a Pivot Grid field and add it to the PivotGridControl.Fields collection.

  2. Set the PivotGridField.UnboundType property to a specific data type such as String, Decimal, or DateTime.

  3. Bind the field to the result of the calculation in one of the following ways:

Refer to the following article for information on how to populate fields with the result of the calculated expression in Optimized mode: Bind Pivot Grid Fields to Calculated Expressions.