Hi Dhana,
Are you using GroupingGridControl? If so, you can get the group name of the record and set the color of the record depends on the group name by using QueryCellStyleInfo event. Here is a code snippet to show this.
private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
Element el=e.TableCellIdentity.DisplayElement ;
if(el != null && el.ParentGroup != null
&& el.ParentGroup.Category != null )
{
string GroupName = el.ParentGroup.Category.ToString() ;
switch(GroupName)
{
case "Market Data":
e.Style.BackColor = Color.Goldenrod;
break;
case "Data":
e.Style.BackColor = Color.Pink ;
break;
case "Credit":
e.Style.BackColor = Color.PowderBlue ;
break;
case "Market":
e.Style.BackColor = Color.Gray ;
break;
case "Credit Data":
e.Style.BackColor = Color.Red;
break;
default:
e.Style.BackColor = Color.White;
break;
}
}
}
Please refer to the attached sample for implementation.
GRoupingColors.zipBest Regards,
Haneef