ASPxGridView.TotalSummary Property
Provides access to total summary items.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Default | Description |
---|---|---|
ASPxSummaryItemCollection | null | An ASPxSummaryItemCollection object that is the collection of summary items. |
Remarks
Total summaries are displayed within footer cells provided that the ASPxGridViewSettings.ShowFooter option is set to true
. The total summary represents a value of an aggregate function calculated over all data rows displayed within the ASPxGridView.
Note
In server mode, a summary cannot be calculated for unbound columns whose values are calculated via events (see ASPxGridView.CustomUnboundColumnData). Only columns with unbound expressions (see GridViewDataColumn.UnboundExpression) support summary calculation.
To learn more, see Data Summaries.
Online Example
Example
This example calculates the average budget and displays it within the ASPxGridView’s footer.
protected void Page_Load(object sender, EventArgs e) {
ASPxSummaryItem totalSummary = new ASPxSummaryItem();
totalSummary.FieldName = "Budget";
totalSummary.ShowInColumn = "Budget";
totalSummary.SummaryType = SummaryItemType.Average;
ASPxGridView1.TotalSummary.Add(totalSummary);
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the TotalSummary 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.