Hi,
I change the styles of the rows normal, alternate and selected via stylesheets. Additionally I implemented onmouseover, onmouseoout and class with gv_Alternativen_RowDataBound.
But when I do a mouseover in the selected row, the wrong onmouseout is placed there:
Protected Sub gv_Alternativen_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gv_Alternativen.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Select Case e.Row.RowState
Case Is <> DataControlRowState.Selected
'odd even
If e.Row.RowState = DataControlRowState.Normal And e.Row.RowState <> DataControlRowState.Selected Then
e.Row.Attributes.Clear()
e.Row.Attributes.Add("onmouseout", "this.className='PopupAngeboteRow'")
e.Row.Attributes.Add("onmouseover", "this.className='PopupAngeboteRowHover'")
e.Row.Attributes.Add("class", "PopupAngeboteRow")
ElseIf e.Row.RowState = DataControlRowState.Alternate And e.Row.RowState <> DataControlRowState.Selected Then
e.Row.Attributes.Clear()
e.Row.Attributes.Add("onmouseout", "this.className='PopupAngeboteAlternatingRow'")
e.Row.Attributes.Add("onmouseover", "this.className='PopupAngeboteRowHover'")
e.Row.Attributes.Add("class", "PopupAngeboteAlternatingRow")
End If
Case Is = DataControlRowState.Selected
e.Row.Attributes.Clear()
e.Row.Attributes.Add("onmouseover", "this.className='PopupAngeboteRowSelected'")
e.Row.Attributes.Add("onmouseout", "this.className='PopupAngeboteRowSelected'")
e.Row.Attributes.Add("class", "PopupAngeboteRowSelected")
End Select
End If
End Sub
Any ideas???
thx a lot in advance, greetings...