Conditional Formatting Demo

This sample demonstrates how to selectively apply styles to table cells.

Features:

The following code sets the text color of those record-field cells whose Customer ID values start with "A."

                GridConditionalFormatDescriptor Descriptor1 = new GridConditionalFormatDescriptor();
                Descriptor1.Appearance.AnyRecordFieldCell.TextColor = System.Drawing.Color.White;
                gridConditionalFormatDescriptor1.Expression = "[CustomerID]  LIKE \'A*\'";
                this.gridGroupingControl1.TableDescriptor.ConditionalFormats.Add(Descriptor1);  

Conditional Formatting screenshot