DataSourceColumnBinding Class
Defines a data binding to a source data column.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v19.2.dll
Declaration
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
Object
DataBindingBase
DataSourceColumnBindingBase
DataSourceColumnBinding
See Also