VirtualServerModeSource.TotalSummary Event
Fires when a grid control asks the data source to calculate total summaries.
Namespace: DevExpress.Data
Assembly: DevExpress.Data.v21.1.dll
NuGet Package: DevExpress.Data
Declaration
Event Data
The TotalSummary event's data class is VirtualServerModeTotalSummaryEventArgs. 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. |
The event data class exposes the following methods:
Method | Description |
---|---|
NotifyIntermediateSummaryReady(IDictionary<ServerModeSummaryDescriptor, Object>) | |
NotifySummaryReady(IDictionary<ServerModeSummaryDescriptor, Object>) | Allows you to update the bound grid control with intermediate summary values. |
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+).