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.2.dll

Declaration

public class MovingCalculationBinding :
    MovingCalculationBindingBase

Remarks

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">
    <DataBindingSerializable>
       <dx:MovingCalculationBinding PartitioningCriteria="ColumnValueAndRowParentValue" Direction="AcrossThenDown" 
           SummaryType="Average" PreviousValuesCount="1" NextValuesCount="1" >
           <SourceSerializable>
               <dx:DataSourceColumnBinding ColumnName="Extended Price" />
           </SourceSerializable>
       </dx:MovingCalculationBinding>
    </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