I migrated this code from vs 03 to vs 05.
It work fine in 03 but not 05.
When I execute code below in my vs 05 the row color has changed but when mouseout from row the color will change back to only 1 type of color.note : the code below is 05 which is modified.
Can any one figure out my wrong ?
asp Code:
Protected Sub grdStatusMaster_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdStatusMaster.RowDataBound If e.Row.RowType = ListItemType.Item Or e.Row.RowType = ListItemType.AlternatingItem Then e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='ghostwhite'") If e.Row.RowType = ListItemType.Item Then e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='WhiteSmoke'") Else e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='White'") End If End If End Sub




Reply With Quote