Skip to main content
A newer version of this page is available. .

Data Summaries

  • 2 minutes to read

ASPxCardView allows you to display a summary, i.e., brief information about data columns. For example, you can display the number of records or the maximum value.

ASPxCardView supports the total summary that represents the value of an aggregate function calculated over all the cards within ASPxCardView and are displayed within the Summary Panel.

ASPxCardView_TotalSummary

Summaries are represented by ASPxSummaryItem objects. To work properly, the following two summary item properties must be specified.


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

The summary item above summarizes the ‘Total’ field values within cards and displays the sum in the summary panel.

Note

In server mode, a summary cannot be calculated for unbound columns in which values are calculated using events (see ASPxCardView.CustomUnboundColumnData). Only columns with unbound expressions (see CardViewColumn.UnboundExpression) support summary calculation.

Example

The code sample below demonstrates how you can specify total summaries.

The image below shows the result.

ASPxCardView_SummaryItems

<dx:ASPxCardView ID="ASPxCardView1"  runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" KeyFieldName="ProductID">
    <Settings ShowSummaryPanel="True" />
    <Columns>
        ...
    </Columns>
    <TotalSummary>
        <dx:ASPxCardViewSummaryItem FieldName="ProductID" SummaryType="Count" DisplayFormat="Count of products = {0} " />
        <dx:ASPxCardViewSummaryItem FieldName="UnitPrice" SummaryType="Min" DisplayFormat="Minimum price = ${0} " />
        <dx:ASPxCardViewSummaryItem FieldName="UnitPrice" SummaryType="Max" DisplayFormat="Maximum price = ${0} " />
        <dx:ASPxCardViewSummaryItem FieldName="UnitsInStock" SummaryType="Sum" DisplayFormat="Units in stock = {0} " />
    </TotalSummary>
</dx:ASPxCardView>

Concepts

Task-Based Help