A
Arch
I have a datagrid with alternating bg colors, and I added an onmouseover
event to shade them yet another color. Here's the way Google taught me
to do it:
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#DFCBFF'")
End If
If e.Item.ItemType = ListItemType.Item Then
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='White'")
Elseif e.Item.ItemType = ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='#CFD1FB'")
End If
But the effect is too busy, and I'd like to experiment with other
effects - specifically, I'd like to leave the bg color the same and show
the top and bottom borders of the rolled-over row. Is there a way to use
code similar to mine to change other attributes of a row when the mouse
goes over it? Or any way?
Thanks for any help.
event to shade them yet another color. Here's the way Google taught me
to do it:
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='#DFCBFF'")
End If
If e.Item.ItemType = ListItemType.Item Then
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='White'")
Elseif e.Item.ItemType = ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='#CFD1FB'")
End If
But the effect is too busy, and I'd like to experiment with other
effects - specifically, I'd like to leave the bg color the same and show
the top and bottom borders of the rolled-over row. Is there a way to use
code similar to mine to change other attributes of a row when the mouse
goes over it? Or any way?
Thanks for any help.