Back to Devexpress

RunningTotalBinding Class

wpf-devexpress-dot-xpf-dot-pivotgrid-37d67e73.md

latest3.6 KB
Original Source

RunningTotalBinding Class

Defines the calculation that aggregates values cumulatively in the window.

Namespace : DevExpress.Xpf.PivotGrid

Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public class RunningTotalBinding :
    DirectedCalculationBinding
vb
Public Class RunningTotalBinding
    Inherits DirectedCalculationBinding

Remarks

Follow the steps listed below to bind a Pivot Grid field to the result of the calculation in Optimized mode.

  1. Create an instance of the RunningTotalBinding class with the Source property set to the DataBinding descendant instance.
  2. Specify the window frame and summary type.
  3. Assign the RunningTotalBinding instance to the PivotGridField.DataBinding property.

The example below shows how to use RunningTotalBinding to display a cumulative total of the Extended Price field values.

View Example: Pivot Grid Optimized Mode - Field Calculation Data Binding

xaml
<dxpg:PivotGridControl
<!-- ... -->
    DataProcessingEngine="Optimized"
    <!-- ... -->
    <dxpg:PivotGridControl.Fields>
    <!-- ... -->
        <dxpg:PivotGridField
            Area="DataArea"
            AreaIndex="4"
            Caption="Running Total"
            CellFormat="C"
            Name="fieldRunningTotal">
            <dxpg:PivotGridField.DataBinding>
                <dxpg:RunningTotalBinding PartitioningCriteria="ColumnValue" SummaryType="Sum">
                    <dxpg:RunningTotalBinding.Source>
                        <dxpg:DataSourceColumnBinding ColumnName="Extended Price" />
                    </dxpg:RunningTotalBinding.Source>
                </dxpg:RunningTotalBinding>
            </dxpg:PivotGridField.DataBinding>
        </dxpg:PivotGridField>
        <!-- ... -->
    </dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>

Inheritance

Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement DataBinding CalculationBinding DirectedCalculationBinding RunningTotalBinding

See Also

RunningTotalBinding Members

Bind Pivot Grid Fields to Window Calculations

DevExpress.Xpf.PivotGrid Namespace