Skip to main content

Conditional Formatting Rules Manager

  • 4 minutes to read

The Conditional Formatting Rules Manager allows you to view and edit all conditional formatting rules currently applied to the grid’s view, as well as create new ones. The manager is available both at design time and runtime.

Select the GridControl or a column, invoke the Quick Actions, and select Manage Conditional Formatting Rules to invoke the manager at design time.

Conditional Formatting Manager Quick Actions

Click the Manage Rules item in the Conditional Formatting Menu to invoke the manager at runtime.

Set the TableView.AllowConditionalFormattingManager (or TreeListView.AllowConditionalFormattingManager) property to true to enable the manager at runtime.

Note

Specify the type of records contained in the data source using the DataControlBase.DesignTimeDataObjectType property to make the manager correctly work at design time.

This topic consists of the following sections:

Conditional Formatting Rules Manager Actions

The image below shows the conditional formatting rules manager.

CFManager

The conditional formatting rules manager provides the following actions:

Element Action
New Rule… button Opens the New Formatting Rule dialog for creating a new rule.
Edit Rule … button Opens the Edit Formatting Rule dialog for editing a selected rule. You can double-click a rule to open this dialog.
Delete Rule button Deletes a selected rule.
Up/Down buttons Reorders format rules in the rule list. This allows specifying their priority from high to low.
Apply to the row check box Specifies whether to apply a rule to the entire row.
Column combo box Specifies a field name of a column to which to apply a rule.
Is Enabled check box Specifies whether to enable or disable a rule.
Show formatting rules for combo box Allows filtering rules by a specified grid column.

Conditional Formatting Rule Types

Use the conditional formatting rules manager to apply the following predefined rule types:

Use the Format Cells dialog to define the applied rule’s visual style.

Format all cells based on their values

Allows you to apply conditional formatting rules to cells based on their values. You can use the following format styles:

CFManagerValues

Format only cells that contain

Allows formatting cells comparing cell values with static values. Rules are based on the following types of cell content:

  • Cell Value - Cells whose values are between (equal to, greater than, less than) the specified value(s).
  • Specific Text - Cells whose values contain (begin/end with) the specified text.
  • Dates Occurring - Date-time values that fall into a specified interval.
  • Blanks - Cells with blank values.

CFManagerContain

Format only top or bottom ranked values

Allows formatting top or bottom ranked values.

CFManagerTopBottom

Format only values that are above or below average

Allows formatting values that are above or below average.

CFManagerAboveBelow

Format only unique or duplicate values

Allows formatting values that are unique or duplicate.

CFMangerUniqueDuplicate

Format only changing values

Allows formatting changing values in real time.

CFManagerDataUpdate

Use a formula to determine which cells to format

Allows specifying a custom condition for the rule.

CFMangerFormula

Format Cells Dialog Window

The Format Cells dialog allows defining the visual appearance of the applied rule. Click the Format button in the New Formatting Rule (or Edit Formatting Rule) dialog to access this window.

CFManagerFormatCells

Use the Format Cells dialog to specify the following settings:

  • Font - Allows changing cell font attributes.
  • Fill - Allows setting a cell background color.
  • Icon - Allows selecting an icon displayed within the formatted cells.

Conditional Formatting Rules Manager Specifics

Call the TableView.ShowConditionalFormattingManager (or TreeListView.ShowConditionalFormattingManager) method to invoke the conditional formatting rules manager in code.

Use the TableView.ConditionalFormattingManagerServiceTemplate (or TreeListView.ConditionalFormattingManagerServiceTemplate) property to define a custom template for the conditional formatting rules manager.

See Also