Skip to main content

TreeList.FormatRules Property

Provides access to a collection of conditional formatting rules, which allow you to change the appearance of individual cells or rows based on specific conditions.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v23.2.dll

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

Declaration

[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true, 1002, XtraSerializationFlags.DefaultValue)]
[XtraSerializablePropertyId(5)]
public virtual TreeListFormatRuleCollection FormatRules { get; }

Property Value

Type Description
TreeListFormatRuleCollection

A collection of conditional formatting rules.

Remarks

The conditional formatting feature allows highlighting critical information, identifying trends and exceptions, and comparing data.

To apply style format rules to a TreeList, use the FormatRules collection. Each rule in this collection is specified by the TreeListFormatRule object. It identifies a column that provides values for the current rule (TreeListFormatRule.Column), the rule type (FormatRuleBase.Rule) and other options.

The collection of format rules can be customized at design time and in code. To customize this collection at design time, you can use the Style Format Rules page of the Tree List Designer, or the Format Rule Collection Editor invoked by clicking the ellipsis button for the FormatRules property.

TreeListDesignerAppearanceCategoryFormatRulesPage TreeListFormatRuleCollectionEditorViaPropertiesGrid

If the TreeListOptionsMenu.ShowConditionalFormattingItem property is enabled, an end-user can customize the format rules collection at runtime using the column’s context menu.

See the Conditional Formatting document to learn more.

See Also