CalculationBinding.Source Property
Gets or sets a data binding object that provides the data to calculate.
Namespace: DevExpress.Xpf.PivotGrid
Assembly: DevExpress.Xpf.PivotGrid.v24.2.dll
NuGet Package: DevExpress.Wpf.PivotGrid
#Declaration
public DataBinding Source { get; set; }
#Property Value
Type | Description |
---|---|
Data |
A 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.
- Create an instance of the
RunningTotalBinding
class with theSource
property set to a DataBinding descendant instance. - Specify the window frame and summary type.
- 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>
#Related GitHub Examples
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.