Do it in Paint like;
Protected Overloads Overrides Sub Paint(ByVal graph As Graphics, _
ByVal rectbounds As Rectangle, ByVal curmngrSrc As _
CurrencyManager, ByVal RowNumber As Integer, ByVal _
ForeColorBrush As Brush, ByVal BackColorBrush As Brush, _
ByVal AlignmentRight As Boolean)
' Set Default fore/back colors
ForeColorBrush = Brushes.Black
BackColorBrush = Brushes.White
Dim ObjVal As Object
Dim dr As DataRow = CType(curmngrSrc.List().Item(RowNumber), DataRowView).Row
ObjVal = dr(1).ToString.Trim()
If Not (IsNothing(ObjVal) Or IsDBNull(ObjVal)) Then
Dim cellValue As String
cellValue = CType(ObjVal, String)
If (cellValue.Contains("ON_HOLD")) Then
ForeColorBrush = Brushes.PaleTurquoise
ElseIf (cellValue.Contains("FAILED")) Then
ForeColorBrush = Brushes.Red
End If
End If
Dim ri As Integer
ri = frmMAIN.frmchldStatus.dgJobStatus.CurrentRowIndex
If ((ri >= 0) And (ri = RowNumber)) Then
'If datagrid current row index matches the selected row then set the selection fore/back colors
If (frmMAIN.frmchldStatus.dgJobStatus.IsSelected(ri)) Then
BackColorBrush = Brushes.DarkBlue
ForeColorBrush = Brushes.White
End If
Else
End If
' Call Paint from the base class to
' accomplish the actual drawing.
MyBase.Paint(graph, rectbounds, curmngrSrc, RowNumber, _
BackColorBrush, ForeColorBrush, AlignmentRight)
End Sub