Skip to main content

VerticalGridSettings.TotalSummary Property

Provides access to total summary items.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public ASPxVerticalGridSummaryItemCollection TotalSummary { get; }

Property Value

Type Description
ASPxVerticalGridSummaryItemCollection

A ASPxVerticalGridSummaryItemCollection object representing the total summary collection.

Remarks

Use the TotalSummary property to access the collection of total summary items. Note that total summaries are displayed within the VerticalGrid’s summary panel, so you need to enable the grid’s summary panel by setting the ASPxVerticalGridSettings.ShowSummaryPanel (using VerticalGridSettings.Settings.ShowSummaryPanel) property to true.

Note

In database server mode, a summary cannot be calculated for unbound rows in which values are calculated via delegate methods (see VerticalGridSettings.CustomUnboundRowData). Only rows with unbound expressions (see VerticalGridDataRow.UnboundExpression) support summary calculation.

Example

The code sample below demonstrates how to add a summary item to the TotalSummary collection.

@Html.DevExpress().VerticalGrid(settings => {
    settings.Name = "VerticalGrid";
    // ...
    settings.Rows.Add("CompanyName");
    settings.Rows.Add("ContactName");
    // ...
    // Adds a total summary of "Count" type for the "CompanyName" row.
    settings.TotalSummary.Add(DevExpress.Data.SummaryItemType.Count, "CompanyName");
    // Total summaries are displayed within the summary panel. So, the summary panel must be enabled. 
    settings.Settings.ShowSummaryPanel = true;
}).Bind(Model).GetHtml()
See Also