gridview 高亮显示鼠标所在行的问题
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#6699ff'"); e.Row.Attributes.Add("onmouseout", "this.style.backrgoundColor=currentcolor;"); //e.Row.Cells[3].Text = (Convert.ToSingle(e.Row.Cells[3].Text)).ToString("F2"); //e.Row.Cells[3].Text = string.Format("{0:F2}", Convert.ToDouble(e.Row.Cells[3].Text)); }e.Row.Attributes["onmouseover"] = "e=this.style.backgroundColor;this.style.backgroundColor='#6699ff'";e.Row.Attributes["onmouseout"] = "this.style.backgroundColor=e";
[解决办法]
refer:
http://www.cnblogs.com/insus/articles/1411057.html
http://www.cnblogs.com/insus/archive/2011/06/25/2090071.html
http://www.cnblogs.com/insus/archive/2011/10/17/2215637.html