DifferenceBinding Class
Defines the difference calculation between values across a window.
Namespace: DevExpress.Xpf.PivotGrid
Assembly: DevExpress.Xpf.PivotGrid.v24.2.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
DifferenceBinding
class with theSource
property set to the DataBinding descendant instance. - Specify the window frame and calculation settings.
- Assign the
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.
<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