Hi all,
I was hoping someone would give me a hand with an interesting issue i have run into.
Basically I have a bit of code as follows
Pretty self explanatory. However after a postback the mouseover and mouseout javascript events no longer work for the GridRows.Code:Private Sub GridView_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then e.Row.Attributes.Add("OnMouseOver", "return ChangeMyGridView('" & e.Row.ClientID & "');") e.Row.Attributes.Add("OnMouseOut", "this.style.backgroundColor='Transparent'") End If End Sub
Now some of you will say that this is likely because my binding is occurring under a if Not IsPostBack condition and you would be correct.
However the actual syntax for the OnMouseOut and OnMouseOver events in the HTML table row IS THERE after the postback so I am quite confused….
Any Ideas?




Reply With Quote