ColumnView.FormatRules Property
Provides access to a collection of conditional format rules, which allow you to change the appearance of individual cells or rows based on specific conditions.
Namespace: DevExpress.XtraGrid.Views.Base
Assembly: DevExpress.XtraGrid.v17.2.dll
Declaration
[XtraSerializablePropertyId(20)]
[Browsable(true)]
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true, 1000, XtraSerializationFlags.DefaultValue)]
[DXCategory("Appearance")]
public virtual GridFormatRuleCollection FormatRules { get; }
Property Value
Type | Description |
---|---|
GridFormatRuleCollection | A collection of conditional format rules. |
Remarks
The conditional formatting feature allows highlighting critical information, identifying trends and exceptions, and comparing data.
To apply style format rules to a grid control’s View, use the FormatRules collection. Each rule in this collection is specified by the GridFormatRule object. It identifies a column that provides values for the current rule (GridFormatRule.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 (in the Grid Designer), or the Format Rule Collection Editor invoked by clicking the ellipsis button for the FormatRules property (in the Properties window).
If the GridOptionsMenu.ShowConditionalFormattingItem property is enabled, an end-user can customize the format rules collection at runtime using the column’s context menu.
See the Appearance and Conditional Formatting document to learn more.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FormatRules property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.