//变颜色
        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");
            }
        }

相关文章: