Skip to main content
All docs
V25.1
  • CalculationBinding.Source Property

    Gets or sets a data binding object that provides the data to calculate.

    Namespace: DevExpress.Xpf.PivotGrid

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

    NuGet Package: DevExpress.Wpf.PivotGrid

    Declaration

    public DataBinding Source { get; set; }

    Property Value

    Type Description
    DataBinding

    A DataBinding descendant that provides the source data.

    Remarks

    A Source can be a DataSourceColumnBinding object that retrieves data from a data source or any other DataBinding descendant that provides calculated data.

    Example

    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

    1. Create an instance of the RunningTotalBinding class with the Source property set to a DataBinding descendant instance.
    2. Specify the window frame and summary type.
    3. Assign the RunningTotalBinding instance to the PivotGridField.DataBinding property.
    <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>
    

    The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Source property.

    Note

    The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

    See Also