A newer version of this page is available. Switch to the current version.

TreeListSummaryItem.SummaryType Property

Gets or sets the aggregate function type.

Namespace: DevExpress.Web.ASPxTreeList

Assembly: DevExpress.Web.ASPxTreeList.v18.2.dll

Declaration

[DefaultValue(SummaryItemType.None)]
public SummaryItemType SummaryType { get; set; }
<DefaultValue(SummaryItemType.None)>
Public Property SummaryType As SummaryItemType

Property Value

Type Default Description
SummaryItemType

None

A SummaryItemType enumeration value that specifies the aggregate function type.

Remarks

There are five predefined aggregate functions. These are: Sum, Min, Max, Average and Count. To implement your own aggregate function, set the SummaryType property to SummaryItemType.Custom, and handle the ASPxTreeList.CustomSummaryCalculate event.

Examples

This example shows how to create data summaries in code. To display group summaries, enable the TreeListSettings.ShowGroupFooter option. To show total summaries, turn on the TreeListSettings.ShowFooter option. The image below shows the result:

exCreateDataSummary

using DevExpress.Web.ASPxTreeList;

protected void Page_Load(object sender, EventArgs e) {
    if (!IsPostBack) {
        TreeListSummaryItem siBudget = new TreeListSummaryItem();
        siBudget.FieldName = "BUDGET";
        siBudget.ShowInColumn = "BUDGET";
        siBudget.SummaryType = DevExpress.Data.SummaryItemType.Min;
        siBudget.DisplayFormat = "{0:c2}";
        ASPxTreeList1.Summary.Add(siBudget);
    }
}
See Also