光标移动事件。 gridview光标移动变色

//变颜色
        protected void GVDepartmentDialog_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            //判断是否是数据行
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor; this.style.backgroundColor='#00A9FF'");
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
            }
        }

你可能感兴趣的:(GridView)