Skip to main content

How to: Calculate a summary against groups of nodes

The following example demonstrates how to apply a group summary to the Tree List control. The TreeListColumn.RowFooterSummary and TreeListColumn.RowFooterSummaryStrFormat properties are used to set the function type and apply formatting to summary values. The TreeListOptionsView.ShowRowFooterSummary option is enabled to display row footers.

The following image shows the result:

TreeListColumn.RowFooterSummary

treeList1.OptionsView.ShowRowFooterSummary = true;
treeList1.Columns["Budget"].RowFooterSummary = SummaryItemType.Sum;
treeList1.Columns["Budget"].RowFooterSummaryStrFormat = "Budget Total {0:c}";