Back to Devexpress

CardViewSettings.TotalSummary Property

aspnetmvc-devexpress-dot-web-dot-mvc-dot-cardviewsettings-5139b62d.md

latest2.9 KB
Original Source

CardViewSettings.TotalSummary Property

Provides access to total summary items.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public ASPxCardViewSummaryItemCollection TotalSummary { get; }
vb
Public ReadOnly Property TotalSummary As ASPxCardViewSummaryItemCollection

Property Value

TypeDescription
ASPxCardViewSummaryItemCollection

An ASPxCardViewSummaryItemCollection 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 CardView’s summary panel, so you need to enable it by setting the ASPxCardViewSettings.ShowSummaryPanel (via CardViewSettings.Settings .ShowSummaryPanel ) property to true.

Note

In database server mode, a summary cannot be calculated for unbound columns in which values are calculated via delegate methods (see CardViewSettings.CustomUnboundColumnData). Only columns with unbound expressions (see CardViewColumn.UnboundExpression) support summary calculation.

Example

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

csharp
@Html.DevExpress().CardView(settings => {
    settings.Name = "CardView";
    // ...
    settings.Columns.Add("CompanyName");
    settings.Columns.Add("ContactName");
    // ...
    // Adds a total summary of "Count" type in the "CompanyName" column.
    settings.TotalSummary.Add(DevExpress.Data.SummaryItemType.Count, "CompanyName");
    // Total summaries are displayed within the CardView summary panel which must be enabled. 
    settings.Settings.ShowSummaryPanel = true;
}).Bind(Model).GetHtml()

See Also

Card View

CardViewSettings Class

CardViewSettings Members

DevExpress.Web.Mvc Namespace