S
Scott Reynolds
Hello!
I am trying to add onMouseOver attribute to each DataList item, but can't
get it work...
Somebody said that this is a bug in DataList control, if so, is there a
workaround for this?
Thank you in advance!
Scott
-------------- CODE -----------------
Private Sub myDL_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataListItemEventArgs) Handles myDL.ItemDataBound
Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView)
If Not drv Is Nothing Then
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType =
ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onmouseover",
"this.style.backgroundColor='#ff0000'")
End If
End If
End Sub
I am trying to add onMouseOver attribute to each DataList item, but can't
get it work...
Somebody said that this is a bug in DataList control, if so, is there a
workaround for this?
Thank you in advance!
Scott
-------------- CODE -----------------
Private Sub myDL_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataListItemEventArgs) Handles myDL.ItemDataBound
Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView)
If Not drv Is Nothing Then
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType =
ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onmouseover",
"this.style.backgroundColor='#ff0000'")
End If
End If
End Sub