Skip to main content
Tab

ASPxGridView.TotalSummary Property

Provides access to total summary items.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(null)]
public ASPxSummaryItemCollection TotalSummary { get; }

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

View Example: How to use group footer and footer templates to customize group and total summaries

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);
}
See Also