Back to Devexpress

TreeListColumn.RowFooterSummaryStrFormat Property

windowsforms-devexpress-dot-xtratreelist-dot-columns-dot-treelistcolumn-3889ba4a.md

latest4.2 KB
Original Source

TreeListColumn.RowFooterSummaryStrFormat Property

Gets or sets the format to display the TreeListColumn.RowFooterSummary.

Namespace : DevExpress.XtraTreeList.Columns

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[DefaultValue("{0}")]
[XtraSerializableProperty]
[XtraSerializablePropertyId(2)]
public string RowFooterSummaryStrFormat { get; set; }
vb
<DefaultValue("{0}")>
<XtraSerializableProperty>
<XtraSerializablePropertyId(2)>
Public Property RowFooterSummaryStrFormat As String

Property Value

TypeDefaultDescription
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:

csharp
treeList1.OptionsView.ShowRowFooterSummary = true;
treeList1.Columns["Budget"].RowFooterSummary = SummaryItemType.Sum;
treeList1.Columns["Budget"].RowFooterSummaryStrFormat = "Budget Total {0:c}";
vb
TreeList1.OptionsView.ShowRowFooterSummary = True
TreeList1.Columns("Budget").RowFooterSummary = SummaryItemType.Sum
TreeList1.Columns("Budget").RowFooterSummaryStrFormat = "Budget Total {0:c}"

See Also

RowFooterSummary

TreeListColumn Class

TreeListColumn Members

DevExpress.XtraTreeList.Columns Namespace