All docs
V19.2
21.1
20.2
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.
A newer version of this page is available. Switch to the current version.

ExpressionDataBinding Class

Defines a calculation based on a string expression.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v19.2.dll

Declaration

public class ExpressionDataBinding :
    ExpressionBindingBase

Remarks

To bind a PivotGrid field to the result of the calculation, perform the following steps:

  1. Create an instance of the ExpressionDataBinding class.
  2. Specify the expression.
  3. Assign the ExpressionDataBinding instance to the PivotGridField.DataBinding property.

Example

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

pivotGridControl.OptionsData.DataProcessingEngine = PivotDataProcessingEngine.Optimized;
PivotGridField yearOfFirstSale = new PivotGridField()
{
    Area = PivotArea.RowArea,
    AreaIndex = 0,
    Caption = "Year of first sale"
};
yearOfFirstSale.DataBinding = new ExpressionDataBinding()
{
    Expression = "Aggr(Min(GetYear([OrderDate])), [Country])"
};
yearOfFirstSale.Options.ShowTotals = false;
pivotGridControl.Fields.Add(yearOfFirstSale);

Inheritance

See Also