Skip to main content
Tab

ASPxSummaryItem Class

Represents a summary item.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

#Declaration

public class ASPxSummaryItem :
    ASPxSummaryItemBase

#Remarks

The ASPxGridView allows you to display brief information about groups of rows or individual data columns. For instance, you can display the number of records, or the maximum value, etc. This is called a summary. Summaries are represented by the ASPxSummaryItem objects.

The ASPxGridView supports two types of summaries:

For a summary item, the following two properties must be specified.

<dx:ASPxSummaryItem FieldName="Total" SummaryType="Sum"/>

The summary item above summarizes the ‘Total’ field values within a group and display the sum in the group row.

The ASPxSummaryItem provides the ASPxSummaryItem.ShowInColumn and ASPxSummaryItem.ShowInGroupFooterColumn properties allowing you to select where the summary is displayed.

To learn more, see Data 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);
}

#Implements

DevExpress.Data.Summary.ISummaryItem
See Also