Skip to main content

DifferenceBinding Class

Defines the difference calculation between values across a window.

Namespace: DevExpress.Web.ASPxPivotGrid

Assembly: DevExpress.Web.ASPxPivotGrid.v23.2.dll

NuGet Package: DevExpress.Web


public class DifferenceBinding :


To bind a Pivot Grid field to the result of the Difference window calculation, do the following:

  1. Create an instance of the DifferenceBinding class with the Source property set to the DataBindingBase descendant instance.
  2. Specify the window frame and calculation settings.
  3. Assign the 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.

View Example

 <dx:PivotGridField ID="fieldDifference" Area="DataArea" AreaIndex="6" Name="fieldDifference" Caption="Difference">
       <dx:DifferenceBinding DifferenceType="Absolute" Target="Previous" Direction="AcrossThenDown" 
               <dx:DataSourceColumnBinding ColumnName="Extended Price" />
    <CellFormat FormatString ="c2" FormatType="Numeric"></CellFormat>

See the following topic for more information: Data Binding API.


See Also