如题.鼠标放在某一单元格里颜色改变 怎么实现

解决方案 »

  1.   

    在 RowDataBound 事件里
     protected void ss1_RowDataBound(object sender, GridViewRowEventArgs e)
            {
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    //鼠标经过时,行背景色变 
                    e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#E6F5FA'");
                    //鼠标移出时,行背景色变 
                    e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'");
                }
            }