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
Remarks
To bind a Pivot Grid
field to the result of the Difference window calculation, do the following:
- Create an instance of the
DifferenceBinding
class with theSource
property set to the DataBindingBase descendant instance. - Specify the window frame and calculation settings.
- 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.
<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.
Inheritance
See Also