Adding conditional formatting to a Grid widget
You can apply conditional formatting to your grid to make the data easier to understand and to highlight important conditions in the data.
Rules are applied from the bottom of the list up, so the top rules will take priority. You can reorder the list of rules to suit your needs. Click and drag a rule to the appropriate spot in the list using the handle
on the left side of the rule.


- On the header of a grid column, right-click and select Conditional Formatting.
The Conditional Formatting Rules Manager dialog box is displayed. - Click Add Rule.
- Specify the rule.
- Rule Name — type a name for the rule.
- Column — select the column that is the basis for the rule.
- Operator — select how the value in the selected Column should relate to the value specified in the Value field.
- Value — the value that is used to evaluate the rule. This can be a fixed value or the value from a specified column.
- Toggle — use the Toggle to switch between using a fixed value for the rule and using the value from a selected column.
- Format — specify the formatting of the text if the condition is met. When you select the button, the Color Picker appears where you can control the background color and the text color.
- Row — select this checkbox if the rule applies to the entire row.
- Enabled — select this checkbox to make the rule active.
- Click Add Rule to add additional rules. If an additional rule is similar to an existing rule, you can copy the original rule and modify the copy.
- Click OK.

- On the header of a grid column, right-click and select Conditional Formatting.
The Conditional Formatting Rules Manager dialog box is displayed. - Select a rule to copy, or select Add Rule and add the rule.
- Click Copy
for the rule you want to copy.
The Select Columns dialog box is displayed. - Click Select All to create a copy of the rule for every column, or select the specific columns that need a copy of the rule.
- Click OK.
You can adjust the formatting of the copies without affecting the original rule or the other copies.

- On the header of a grid column, right-click and select Conditional Formatting.
The Conditional Formatting Rules Manager dialog box is displayed. - Edit the rule as necessary. You also can use the Enabled checkbox to turn the conditional formatting on or off. You can select Delete
to remove the rule.
- Click OK.
Last modified: Friday May 12, 2023