windowsforms-devexpress-dot-xtrapivotgrid-cb8433d2.md
Defines aggregations across a specified number of values before and/or after the current value.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.XtraPivotGrid.v25.2.dll
NuGet Package : DevExpress.Win.PivotGrid
public class MovingCalculationBinding :
MovingCalculationBindingBase
Public Class MovingCalculationBinding
Inherits MovingCalculationBindingBase
To bind a PivotGrid field to the result of the calculation in Optimized mode, do the following:
The following code snippet illustrates the use of the Data Binding API to calculate the average of the preceding, current and following values in the column:
Run Demo: Optimized Mode - Field Calculation Bindings
[CodeExampleDataFile("nwind.xml")]
public static void PivotCalculations(PivotGridControl pivotGridControl) {
productAmountBinding, CalculationPartitioningCriteria.ColumnValue, PivotSummaryType.Sum);
//Calculate the average of the preceding, current and following values in the column.
pivotGridControl.Fields["fMovingAverage"].DataBinding = new MovingCalculationBinding(
pivotGridControl.BestFit();
Public Sub PivotCalculations(ByVal pivotGridControl As PivotGridControl)
Dim productAmountBinding As New DataSourceColumnBinding("ExtendedPrice")
pivotGridControl.Fields("fMovingAverage").DataBinding = New MovingCalculationBinding(productAmountBinding,
End Sub
Object DataBindingBase CalculationBindingBase DirectedCalculationBindingBase MovingCalculationBindingBase MovingCalculationBinding
See Also
MovingCalculationBinding Members