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.

ExpressionDataBinding Class

Defines a calculation based on a string expression.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v20.1.dll

Declaration

public class ExpressionDataBinding :
    ExpressionBindingBase
Public Class ExpressionDataBinding
    Inherits ExpressionBindingBase

Remarks

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

  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