Posted on 2005-04-05
I am trying to put differnt colors for datagrid rows based item dispalyed. I can get colors different colors but the problem is:
Suppose I have and item named "Abc", here I get specified color for some of the "Abc" but not all. If I specifiy all other items one color, I get some of the Other items the specified color but not all.
Select Case e.Item.ItemType
Dim lstSys As String = CType(e.Item.FindControl("lblSysName"), Label).Text
Select Case lstSys
e.Item.BackColor = Drawing.Color.Red.LightYellow
e.Item.BackColor = Drawing.Color.Red.LimeGreen
'If lstSys = "Abc" Then
' e.Item.BackColor = Drawing.Color.Red.LightYellow
' e.Item.BackColor = Drawing.Color.Red.Silver
I tried both If and case conditions but the result is same. could anyone pls find what's wrong?