All docs
V20.1
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DataSourceColumnBinding Class

Defines a data binding to a source data column.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v20.1.dll

Declaration

public class DataSourceColumnBinding :
    DataSourceColumnBindingBase
Public Class DataSourceColumnBinding
    Inherits DataSourceColumnBindingBase

Remarks

To bind a PivotGrid field to a data column in the data source, create an instance of the DataSourceColumnBinding class with the DataSourceColumnBinding.ColumnName property set to the name of the source data field and assign the DataSourceColumnBinding instance to the PivotGridField.DataBinding property.

Example

The following code snippet illustrates the use of the Data Binding API:

NOTE

The complete sample project is available in the DevExpress Demo Center: Code Examples - Optimized Mode - Field Calculation Bindings module in the XtraPivotGrid MainDemo.

pivotGridControl.OptionsData.DataProcessingEngine = PivotDataProcessingEngine.Optimized;

PivotGridField fieldProductAmount = new PivotGridField()
{
    Area = PivotArea.DataArea,
    Caption = "Product Sales",
    Name = "fProductAmount"
};

DataSourceColumnBinding productAmountBinding = new DataSourceColumnBinding("ProductAmount");
//Bind a field to a column in the data source.
fieldProductAmount.DataBinding = productAmountBinding;
pivotGridControl.Fields.Add(fieldProductAmount);

Inheritance

See Also