We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Order in which format are ordered when ggc has more than one conditional format and one overlaps the other

in what order GridConditionalFormat applied when ggc has more than one conditional formats and one format overlaps the other

1 Reply

AJ Ajish Syncfusion Team August 30, 2007 01:40 AM UTC

Hi,

Thank you for your interest in Syncfusion products,

The higher precedence will be given to the format that is applied first or the GridConditionalFormatDescriptor that is added to the GridConditionalFormatDescriptorCollection as the first one.

For example, consider the following code snippet. The gridConditionalFormatDescriptor1 backcolor will have precedence than the gridConditionalFormatDescriptor2
>>>>>
Syncfusion.Windows.Forms.Grid.Grouping.GridConditionalFormatDescriptor gridConditionalFormatDescriptor1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridConditionalFormatDescriptor();
Syncfusion.Windows.Forms.Grid.Grouping.GridConditionalFormatDescriptor gridConditionalFormatDescriptor2 = new Syncfusion.Windows.Forms.Grid.Grouping.GridConditionalFormatDescriptor();
gridConditionalFormatDescriptor1.Appearance.AnyRecordFieldCell.Interior = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(191)))), ((int)(((byte)(52))))));
gridConditionalFormatDescriptor1.Appearance.AnyRecordFieldCell.TextColor = System.Drawing.Color.White;
gridConditionalFormatDescriptor1.Expression = "[CustomerID] LIKE \'A*\'";
gridConditionalFormatDescriptor1.Name = "ConditionalFormat 1";
gridConditionalFormatDescriptor2.Appearance.AnyRecordFieldCell.Font.Bold = true;
gridConditionalFormatDescriptor2.Appearance.AnyRecordFieldCell.Interior = new Syncfusion.Drawing.BrushInfo( System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(110)))), ((int)(((byte)(152))))));
gridConditionalFormatDescriptor2.Appearance.AnyRecordFieldCell.TextColor = System.Drawing.Color.Red;
gridConditionalFormatDescriptor2.Expression = "[CompanyName] LIKE \'Alfreds Futterkiste\'";
gridConditionalFormatDescriptor2.Name = "ConditionalFormat 2";
this.gridGroupingControl1.TableDescriptor.ConditionalFormats.Add(gridConditionalFormatDescriptor1); this.gridGroupingControl1.TableDescriptor.ConditionalFormats.Add(gridConditionalFormatDescriptor2);
>>>>>

Kindly take a look and let me know if you need any further assistance.

Regards,
Ajish.

Loader.
Live Chat Icon For mobile
Up arrow icon