Skip to main content
Tag

PivotGridField.DataBinding Property

Gets or sets an object that specifies the Pivot Grid field’s source data.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v22.1.dll

NuGet Package: DevExpress.Wpf.PivotGrid

Declaration

public DataBinding DataBinding { get; set; }

Property Value

Type Description
DataBinding

A DataBinding object that specifies the source data for the Pivot Grid fields.

Remarks

Pivot Grid uses the Binding API to bind Pivot Grid fields to data. Data binding sources can be columns in a data source, calculated expressions, or window calculations.

Refer to the following topics for information on how to bind Pivot Grid fields to data:

Each specified binding object is a DataBinding descendant. This object is assigned to the Pivot Grid field’s DataBinding property.

The following code snippet illustrates the Pivot Grid’s Product Sales field bound to the Extended Price source column:

<dxpg:PivotGridControl>
    <dxpg:PivotGridControl.Fields>
      <dxpg:PivotGridField
          Area="DataArea"
          AreaIndex="5"
          Caption="Product Sales"
          CellFormat="C"
          Name="fieldSales">
          <dxpg:PivotGridField.DataBinding>
              <dxpg:DataSourceColumnBinding ColumnName="Extended Price" />
          </dxpg:PivotGridField.DataBinding>
        </dxpg:PivotGridField>
      </dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>
See Also