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

Specifies a custom string expression with window functions to calculate values. Used as a PivotGrid’s field calculation databinding in Optimized mode.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v24.2.dll

NuGet Package: DevExpress.Wpf.PivotGrid

#Declaration

public class WindowExpressionBinding :
    DirectedCalculationBinding,
    IExpressionBinding

#Remarks

The following example shows how to set up WindowExpressionBinding:

xml
<dxpg:PivotGridControl.Fields>
    <dxpg:PivotGridField
        Area="DataArea"
        AreaIndex="2"
        Caption="Total"
        Name="fieldWindowExpression">
        <dxpg:PivotGridField.DataBinding>
            <dxpg:WindowExpressionBinding
                    Expression="Total(Sum([Extended Price]))" PartitioningCriteria="ColumnValueAndRowParentValue"
                <dxpg:WindowExpressionBinding.Source>
                    <dxpg:DataSourceColumnBinding ColumnName="Extended Price" />
                </dxpg:WindowExpressionBinding.Source>
            </dxpg:WindowExpressionBinding>
        </dxpg:PivotGridField.DataBinding>
    </dxpg:PivotGridField>
</dxpg:PivotGridControl.Fields>

See the following example for more Data Binding usage examples:

View Example: Pivot Grid for WPF - Bind Pivot Grid Fields to Window Calculations

For more information, review the following topic: Optimized Mode and Data Binding API.

See Also