Below is the source code that tries to highlight rows in certain colors depending on value of the certificate. The code runs, but the colors are not showing up. Am i missing something here? Any help would be appreciated. Kudos!
If e.Row.RowType = DataControlRowType.DataRow Then
If CType(sender, GridView).DataKeys(e.Row.RowIndex).Values("Certificate") <100000 Then
e.Row.BackColor = System.Drawing.Color.lightblue
elseIf CType(sender, GridView).DataKeys(e.Row.RowIndex).Values("Certificate") < 1000000 And ("Certificate") > 100000 Then
e.Row.BackColor = System.Drawing.Color.lightGreen
elseIf CType(sender, GridView).DataKeys(e.Row.RowIndex).Values("Certificate") < 10000000 And ("Certificate") > 1000000 Then
e.Row.BackColor = System.Drawing.Color.lightyellow
else
e.Row.BackColor = System.Drawing.Color.blue
End if
End If
End Sub