Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

WindowExpressionBinding Class

Defines the calculation that uses a custom string expression with window functions.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.2.dll

NuGet Package: DevExpress.Win.PivotGrid

#Declaration

public class WindowExpressionBinding :
    WindowExpressionBindingBase

#Remarks

Follow the steps listed below to bind a PivotGrid field to the result of the calculation in Optimized mode.

  1. Create an instance of the WindowExpressionBinding class.
  2. Specify the expression, window frame and direction. The default expression is “Index()” that is the Index window function.
  3. Assign the WindowExpressionBinding 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 fieldWindowExpression = new PivotGridField() {
    Area = PivotArea.DataArea,
    Caption = "Index",
    Name = "fWindowExpression"
};

fieldWindowExpression.DataBinding = new WindowExpressionBinding() {
    PartitioningCriteria = CalculationPartitioningCriteria.ColumnValueAndRowParentValue
};

pivotGridControl.Fields.Add(fieldWindowExpression);
See Also