wpf-devexpress-dot-xpf-dot-pivotgrid-8dfc47fb.md
Defines the difference calculation between values across a window.
Namespace : DevExpress.Xpf.PivotGrid
Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll
NuGet Package : DevExpress.Wpf.PivotGrid
public class DifferenceBinding :
DirectedCalculationBinding
Public Class DifferenceBinding
Inherits DirectedCalculationBinding
To bind a Pivot Grid field to the result of the calculation in Optimized mode, do the following:
DifferenceBinding class with the Source property set to the DataBinding descendant instance.DifferenceBinding instance to the PivotGridField.DataBinding property.The example below shows how to use DifferenceBinding to display the absolute difference between the Extended Price field values.
View Example: Pivot Grid Optimized Mode - Field Calculation Data Binding
<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>
Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement DataBinding CalculationBinding DirectedCalculationBinding DifferenceBinding
See Also