I needed a small reminder today on how to add colour to cells when using the ultragrid component from infragistics. The simple answer is to use the InitializeRow event;

1
2
3
4
5
6
7
8
9
10
private void ultraGrid1_InitializeRow(object sender, 
Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
if (e.Row.ListObject is MyDataItem)
  {
    MyDataItem d = (MyDataItem)e.Row.ListObject;
    if (d.Tel == "456")
e.Row.CellAppearance.BackColor = Color.Yellow;
  }
}