Back to Devexpress

TreeListCustomSummaryEventArgs.SummaryProcess Property

wpf-devexpress-dot-xpf-dot-grid-dot-treelist-dot-treelistcustomsummaryeventargs.md

latest3.3 KB
Original Source

TreeListCustomSummaryEventArgs.SummaryProcess Property

Gets a value indicating the calculation stage.

Namespace : DevExpress.Xpf.Grid.TreeList

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public CustomSummaryProcess SummaryProcess { get; }
vb
Public ReadOnly Property SummaryProcess As CustomSummaryProcess

Property Value

TypeDescription
CustomSummaryProcess

A CustomSummaryProcess enumeration value indicating the calculation stage.

|

Available values:

NameDescription
Start

Indicates that the process of custom summary calculation is about to be started.

| | Calculate |

Indicates that custom summary calculation is in progress. This means the event is raised for a specific data row containing the field value used to calculate the processed custom summary.

| | Finalize |

Indicates that the process of custom summary calculation is finished.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SummaryProcess 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.

wpf-tree-list-calculate-custom-node-summaries/CS/CustomNodeSummaries_CodeBehind/MainWindow.xaml.cs#L25

csharp
if(e.IsNodeSummary && e.SummaryItem.FieldName == "Statistics") {
    if(e.SummaryProcess == CustomSummaryProcess.Calculate) {
        e.TotalValue = Convert.ToDouble(e.TotalValue) + (double)e.FieldValue;

wpf-tree-list-calculate-custom-node-summaries/VB/CustomNodeSummaries_CodeBehind/MainWindow.xaml.vb#L34

vb
If e.IsNodeSummary AndAlso Equals(e.SummaryItem.FieldName, "Statistics") Then
    If e.SummaryProcess = CustomSummaryProcess.Calculate Then
        e.TotalValue = Convert.ToDouble(e.TotalValue) + CDbl(e.FieldValue)

See Also

TreeListCustomSummaryEventArgs Class

TreeListCustomSummaryEventArgs Members

DevExpress.Xpf.Grid.TreeList Namespace