This sample demonstrates how to selectively apply styles to table cells.
Table cells can be formatted conditionally by defining the GridConditionalFormatDescriptor.
Using this descriptor, you can provide a filter criteria for the cell values along with a style setting.
Style is applied only to cells whose values satisfy the given condition.
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);