Hi ollie,
We have reviewed your scenario regarding applying conditional formatting to rows based on expressions. This can be achieved using the GridConditionalFormatDescriptor. We have prepared a sample demonstrating this approach. Please refer to the attached sample for the implementation.
Code Snippet
GridConditionalFormatDescriptor format1 = new GridConditionalFormatDescriptor(); format1.Appearance.AnyRecordFieldCell.Interior = new BrushInfo(Color.FromArgb(255, 191, 52)); format1.Appearance.AnyRecordFieldCell.TextColor = Color.Black; format1.Expression = "[QuantityPerUnit] LIKE ''"; format1.Name = "ConditionalFormat 1"; gridGroupingControl1.TableDescriptor.ConditionalFormats.Add(format1); GridConditionalFormatDescriptor format2 = new GridConditionalFormatDescriptor(); format2.Appearance.AnyRecordFieldCell.Interior = new BrushInfo(Color.FromArgb(102, 110, 152)); format2.Appearance.AnyRecordFieldCell.TextColor = Color.White; format2.Expression = " [QuantityPerUnit] LIKE '*\'"; gridGroupingControl1.TableDescriptor.ConditionalFormats.Add(format2); |
Additionally, kindly refer to the following User Guide Documentation for more information:
If we have misunderstood your request or if your requirements are different, kindly provide more details about the issue. This will help us better understand the problem and provide an appropriate solution.
Thank you for your understanding and cooperation.
Attachment:
GridGroupingControl_Demo4_8_2ef4eb68.zip