DifferenceBinding Class
Defines the difference calculation between values across a window.
Namespace: DevExpress.Xpf.PivotGrid
Assembly: DevExpress.Xpf.PivotGrid.v25.1.dll
NuGet Package: DevExpress.Wpf.PivotGrid
Declaration
Remarks
To bind a Pivot Grid field to the result of the calculation in Optimized mode, do the following:
- Create an instance of the
DifferenceBindingclass with theSourceproperty set to the DataBinding descendant instance. - Specify the window frame and calculation settings.
- Assign the
DifferenceBindinginstance to the PivotGridField.DataBinding property.
The example below shows how to use DifferenceBinding to display the absolute difference between the Extended Price field values.
<dxpg:PivotGridControl
<!-- ... -->
DataProcessingEngine="Optimized"
<!-- ... -->
<dxpg:PivotGridControl.Fields>
<!-- ... -->
<dxpg:PivotGridField
Area="DataArea"
AreaIndex="2"
Caption="Difference"
Name="fieldDifference">
<dxpg:PivotGridField.DataBinding>
<dxpg:DifferenceBinding
DifferenceType="Absolute"
PartitioningCriteria="ColumnValue"
Target="Previous">
<dxpg:DifferenceBinding.Source>
<dxpg:DataSourceColumnBinding ColumnName="Extended Price" />
</dxpg:DifferenceBinding.Source>
</dxpg:DifferenceBinding>
</dxpg:PivotGridField.DataBinding>
</dxpg:PivotGridField>
<!-- ... -->
</dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>
Inheritance
See Also