Skip to main content

MovingCalculationBinding Class

Defines aggregations across a specified number of values before and/or after the current value.

Namespace: DevExpress.Web.ASPxPivotGrid

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

NuGet Package: DevExpress.Web


public class MovingCalculationBinding :


To bind a Pivot Grid field to the result of the Moving Calculation, do the following:

  1. Create an instance of the MovingCalculationBinding class with the Source property set to the DataBindingBase descendant instance.
  2. Specify the window frame and calculation settings.
  3. Assign the MovingCalculationBinding instance to the PivotGridFieldBase.DataBinding property.

The example below shows how to use MovingCalculationBinding to display totals of the Extended Price field’s neighboring values.

View Example

<dx:PivotGridField ID="fieldMovingCalculation" Area="DataArea" AreaIndex="3"  Name="fieldMovingCalculation" Caption="MovingCalculation">
       <dx:MovingCalculationBinding PartitioningCriteria="ColumnValueAndRowParentValue" Direction="AcrossThenDown" 
           SummaryType="Average" PreviousValuesCount="1" NextValuesCount="1" >
               <dx:DataSourceColumnBinding ColumnName="Extended Price" />
    <CellFormat FormatString ="c2" FormatType="Numeric"></CellFormat>

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


See Also