Skip to main content
Tab

ASPxCardView.GetTotalSummaryValue(ASPxCardViewSummaryItem) Method

Returns a summary value calculated against all cards.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web

Declaration

public object GetTotalSummaryValue(
    ASPxCardViewSummaryItem item
)

Parameters

Name Type Description
item ASPxCardViewSummaryItem

An ASPxSummaryItem object that represents the summary item.

Returns

Type Description
Object

An object which represents the summary value.

Remarks

The ASPxCardView enables you to calculate summaries which are aggregate functions based on values of data source fields. The total summary calculates an aggregate function by all cards and displays the result in a footer. The total summary is represented by a ASPxSummaryItem object.

Example

View Example

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

        <dx:ASPxCardView ID="ASPxCardView1" runat="server" OnCustomSummaryCalculate="ASPxCardView1_CustomSummaryCalculate" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" KeyFieldName="ProductID">
            <Settings ShowSummaryPanel="True" />
            <TotalSummary>
                <dx:ASPxCardViewSummaryItem SummaryType="Average" FieldName="UnitPrice" />
                <dx:ASPxCardViewSummaryItem SummaryType="Average" FieldName="UnitsOnOrder" />
                <dx:ASPxCardViewSummaryItem SummaryType="Custom" DisplayFormat="Average Sum ={0}" />
            </TotalSummary>
            <Columns>
                <dx:CardViewTextColumn FieldName="ProductID" ReadOnly="True" Visible="False">
                </dx:CardViewTextColumn>
                <dx:CardViewTextColumn FieldName="ProductName" VisibleIndex="0">
                </dx:CardViewTextColumn>
                <dx:CardViewTextColumn FieldName="UnitPrice" VisibleIndex="1">
                </dx:CardViewTextColumn>
                <dx:CardViewTextColumn FieldName="UnitsInStock" VisibleIndex="2">
                </dx:CardViewTextColumn>
                <dx:CardViewTextColumn FieldName="UnitsOnOrder" VisibleIndex="3">
                </dx:CardViewTextColumn>
                <dx:CardViewTextColumn FieldName="ReorderLevel" VisibleIndex="4">
                </dx:CardViewTextColumn>
                <dx:CardViewCheckColumn FieldName="Discontinued" VisibleIndex="5">
                </dx:CardViewCheckColumn>
            </Columns>
        </dx:ASPxCardView>

        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\nwind.mdb;Persist Security Info=True" ProviderName="System.Data.OleDb" SelectCommand="SELECT [ProductID], [ProductName], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued] FROM [Products]"></asp:SqlDataSource>

    </div>
    </form>
</body>
</html>
See Also