B
Bart
I want to create a mouseover effect which colors the row when the
mousepointer goes over a row. I use this code in the itemDataBound event
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onMouseOver",
"this.style.backgroundColor='Silver'")
e.Item.Attributes.Add("onmouseout",
"this.style.backgroundColor='white'")
e.Item.Style("cursor") = "hand"
End If
The code works fine. But when I attach a stylesheet (css) to the page, the
mouseover won't work anymore. It seems that the stylesheet 'overrules' all
other attributes. Any idea how to solve this ?
Bart
mousepointer goes over a row. I use this code in the itemDataBound event
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onMouseOver",
"this.style.backgroundColor='Silver'")
e.Item.Attributes.Add("onmouseout",
"this.style.backgroundColor='white'")
e.Item.Style("cursor") = "hand"
End If
The code works fine. But when I attach a stylesheet (css) to the page, the
mouseover won't work anymore. It seems that the stylesheet 'overrules' all
other attributes. Any idea how to solve this ?
Bart