Skip to main content

DifferenceBinding Class

Defines the difference calculation between values across a window.

Namespace: DevExpress.Web.ASPxPivotGrid

Assembly: DevExpress.Web.ASPxPivotGrid.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public class DifferenceBinding :
    DifferenceBindingBase

Remarks

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">
    <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.

Implements

DevExpress.XtraPivotGrid.IDesignerContextProvider
See Also