VirtualServerModeSource.TotalSummary Event

Fires when a grid control asks the data source to calculate total summaries.

Namespace: DevExpress.Data

Assembly: DevExpress.Data.v19.2.dll

Declaration

public event EventHandler<VirtualServerModeTotalSummaryEventArgs> TotalSummary
Public Event TotalSummary As EventHandler(Of VirtualServerModeTotalSummaryEventArgs)

Event Data

The TotalSummary event handler receives an argument of the VirtualServerModeTotalSummaryEventArgs type. The following properties provide information specific to this event.

Property Description
CancellationToken Gets a token that allows you to respond to a task cancellation request invoked by the grid control.
ConfigurationInfo Gets information on the grid's current sorting, filtering and summary configuration.
NotReadyObject This member supports the internal infrastructure.
TotalSummaryTask Gets or sets the task that returns the requested summary value.

Remarks

To supply the requested total summary values, create a Task that calculates these values and assign it to the VirtualServerModeTotalSummaryEventArgs.TotalSummaryTask event parameter. Use the VirtualServerModeTotalSummaryEventArgs.ConfigurationInfo parameter to identify the requested summaries.

You can provide the bound grid with intermediate summary results during the task execution. To accomplish this, call the VirtualServerModeTotalSummaryEventArgs.NotifyIntermediateSummaryReady method from the Task.

The created Task must return final values for all requested summaries, including those whose intermediate values are supplied with the NotifyIntermediateSummaryReady method.

TIP

A Task typically executes asynchronously. To return summary values synchronously, create the task with the Task.FromResult method (available in .NET Framework 4.5+).

See Also