TreeListColumn.RowFooterSummaryStrFormat Property
Gets or sets the format to display the TreeListColumn.RowFooterSummary.
Namespace: DevExpress.XtraTreeList.Columns
Assembly: DevExpress.XtraTreeList.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | "{0}" | A string that specifies the format applied to the TreeListColumn.RowFooterSummary. |
Remarks
A format string may specify any characters but the “{“ and “}” characters have a special meaning. They are used for inserting summary values in the following combination: “{0}”. When a summary value is displayed, this combination is substituted for the value itself.
If the TreeListColumn.RowFooterSummary property is set to the SummaryItemType.Count value, you can use the following format string: “Total {0} records”. For instance, if there are 5 child nodes, the summary will be displayed as follows: “Total 5 records”.
Generally, the format string is set in the following form:
<text>{0<:format character<precision specifier>>}<text>
Format specifiers are described in the Format Specifiers and Format Providers topic in MSDN.
If the RowFooterSummaryStrFormat property specifies an empty string, the summary value is displayed alone.
The Tree List pictured below shows the node summary calculated for the “Budget” column. The RowFooterSummaryStrFormat property is set to the “Budget Total {0:c}” string.
Example
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:
treeList1.OptionsView.ShowRowFooterSummary = true;
treeList1.Columns["Budget"].RowFooterSummary = SummaryItemType.Sum;
treeList1.Columns["Budget"].RowFooterSummaryStrFormat = "Budget Total {0:c}";