Back to Devexpress

MovingCalculationBinding Class

aspnet-devexpress-dot-web-dot-aspxpivotgrid-c2b0da06.md

latest3.4 KB
Original Source

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

NuGet Package : DevExpress.Web

Declaration

csharp
public class MovingCalculationBinding :
    MovingCalculationBindingBase
vb
Public Class MovingCalculationBinding
    Inherits 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

aspx
<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

INotifyPropertyChanged

DevExpress.XtraPivotGrid.IDesignerContextProvider

Inheritance

Object DataBindingBase CalculationBindingBase DirectedCalculationBindingBase MovingCalculationBindingBase MovingCalculationBinding

See Also

MovingCalculationBinding Members

Bind Pivot Grid Fields to Window Calculations

DevExpress.Web.ASPxPivotGrid Namespace