C1FlexSheet allows you to change the appearance of an individual cell or a range of cells using conditional formatting. Conditional formatting can be used to compare different data and highlight important data.
In the above image, you see that data is formatted with different font color and background color depending on some conditions. The numbers divisible by 3 appear red, numbers divisible by 4 appear blue, and the numbers which are neither divisible by 3 nor 4 appear with beige background color.
The following code illustrates the conditions that we have set to change the appearance of data in cells:
In the above code, a class named ConditionalCellFactory is used which inherits from CellFactory class of C1FlexGrid control. The ConditionalCellFactory class contains all the implementation of conditional formatting that we have set.