Skip to main content
A newer version of this page is available. .
All docs
V21.1

TreeListView.CustomSummaryCommand Property

Gets or sets a command that calculates a custom summary.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v21.1.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public ICommand<NodeSummaryArgs> CustomSummaryCommand { get; set; }

Property Value

Type Description
DevExpress.Mvvm.ICommand<NodeSummaryArgs>

A command that calculates a custom summary.

Remarks

Bind a command to the CustomSummaryCommand property to maintain a clean MVVM pattern. The command works like a CustomSummary event handler and allows you to specify custom summaries in a View Model.

Total summaries contain predefined aggregate functions. These functions allow you to calculate the following:

  • The number of data rows (Count)
  • The maximum and minimum values (Max and Min)
  • The sum and the average value (Sum and Average)

Use the CustomSummaryCommand property to apply custom rules to calculate summaries. This property allows you to implement custom aggregate functions or use a custom algorithm to calculate summary values.

To calculate a summary manually:

  1. Create a summary item and set its SummaryItemBase.SummaryType property to Custom.
  2. Create a command that uses a custom algorithm to calculate summary values.
  3. Assign this command to the CustomSummaryCommand property.

Refer to the following help topic for more information: Custom Summary.

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