![Win Implementing Conditional Formatting at Design Time 01.png](images/Win_Implementing_Conditional_Formatting_at_Design_Time_01.png)
Conditional Formatting allows you to add rules to a WinGrid™ column that conditionally formats cells if the rule evaluates to true. You can define Conditional Formatting rules in the WinGrid during runtime using the Conditional Formatting dialog. The dialog is available via the Columns Collection Editor through the ValueBasedAppearance property.
To show the conditional formatting dialog, follow these steps:
With WinGrid selected on the form, expand the DisplayLayout object in the Properties window.
Navigate to the Bands collection and expand it.
Expand the band of your choice.
Find the Columns collection and click the ellipsis. The Columns Collection Editor appears.
Click the ellipsis to the right of the ValueBasedAppearance property. The Conditional Formatting dialog box appears.
The steps below demonstrate the process of creating an Operator condition through the conditional formatting dialog. A column containing an integer is used in this example.
Click the “Select a condition type” drop down, and select Operator.
Click the comparison operator drop down and select GreaterThanOrEqualTo.
In the editor, type the value 5.
Using the appearance drop down, configure the cell’s appearance to your liking. Your condition should look similar to the following.
Click OK to close the Conditional Formatting Dialog.
Click OK to the close the Columns Collection Editor. The appearance condition is now set on the grid. Running your application will show the conditional formatting in the grid.