Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound
'Highlight a datagrid row with mouseover..
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='Yellow'")
End If
If e.Item.ItemType = ListItemType.Item Then
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='White'")
Else
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='White'")
End If
End Sub