aspnet-devexpress-dot-web-dot-aspxpivotgrid-f3882607.md
Defines the difference calculation between values across a window.
Namespace : DevExpress.Web.ASPxPivotGrid
Assembly : DevExpress.Web.ASPxPivotGrid.v25.2.dll
NuGet Package : DevExpress.Web
public class DifferenceBinding :
DifferenceBindingBase
Public Class DifferenceBinding
Inherits DifferenceBindingBase
To bind a Pivot Grid field to the result of the Difference window calculation, do the following:
DifferenceBinding class with the Source property set to the DataBindingBase descendant instance.DifferenceBinding instance to the PivotGridFieldBase.DataBinding property.The example below shows how to use DifferenceBinding to display the absolute difference between the Extended Price field values.
<dx:PivotGridField ID="fieldDifference" Area="DataArea" AreaIndex="6" Name="fieldDifference" Caption="Difference">
<DataBindingSerializable>
<dx:DifferenceBinding DifferenceType="Absolute" Target="Previous" Direction="AcrossThenDown"
PartitioningCriteria="ColumnValueAndRowParentValue">
<SourceSerializable>
<dx:DataSourceColumnBinding ColumnName="Extended Price" />
</SourceSerializable>
</dx:DifferenceBinding>
</DataBindingSerializable>
<CellFormat FormatString ="c2" FormatType="Numeric"></CellFormat>
</dx:PivotGridField>
See the following topic for more information: Data Binding API.
DevExpress.XtraPivotGrid.IDesignerContextProvider
Object DataBindingBase CalculationBindingBase DirectedCalculationBindingBase DifferenceBindingBase DifferenceBinding
See Also