ASPxSummaryItemCollection.Add(SummaryItemType, String) Method
In This Article
Adds a new summary item with the specified settings to the collection.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public ASPxSummaryItem Add(
SummaryItemType summaryType,
string fieldName
)
#Parameters
Name | Type | Description |
---|---|---|
summary |
Summary |
A Summary |
field |
String | A String value that specifies the name of the data source field whose values are used for summary calculation. This value is assigned to the ASPx |
#Returns
Type | Description |
---|---|
ASPx |
An ASPx |
#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