aspnet-5155-components-grid-view-concepts-use-data-summaries-obtain-summary-values.md
ASPxGridView supports two types of summaries: Total Summary and Group Summary. This topic explains how to obtain summary values in code.
ASPxGridView stores its total summary items within the ASPxGridView.TotalSummary collection. To obtain the required summary item’s value, use the ASPxGridView.GetTotalSummaryValue method.
int siValue = Convert.ToInt32(ASPxGridView1.GetTotalSummaryValue(
ASPxGridView1.TotalSummary["UnitPrice", DevExpress.Data.SummaryItemType.Max]));
Use the ASPxSummaryItem.GetTotalFooterDisplayText method to obtain the total summary item’s display text.
Group summary items are stored within the ASPxGridView.GroupSummary collection. Use the ASPxGridView.GetGroupSummaryValue method to obtain the required summary item’s value calculated against the specified group of rows.
int gsiValue = Convert.ToInt32(ASPxGridView1.GetGroupSummaryValue(0, ASPxGridView1.
GroupSummary["Discontinued", DevExpress.Data.SummaryItemType.Count]));
Dim gsiValue As Integer = Convert.ToInt32(ASPxGridView1.GetGroupSummaryValue_
(0, ASPxGridView1.GroupSummary("Discontinued", DevExpress.Data.SummaryItemType.Count)))
To get the summary text displayed within the specified group row, use the ASPxGridView.GetGroupRowSummaryText method.
See Also