GridView行背景色改变效果

          protected void gvTestReportOSimple_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowIndex > -1)
            {
  ////当鼠标停留时更改背景色
                //e.Row.Attributes.Add("onmouseover",   "c=this.style.backgroundColor;this.style.backgroundColor='#00A9FF'");
                ////当鼠标移开时还原背景色
                //e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
}
}

posted @ 2011-08-29 17:13  SharpLW  阅读(372)  评论(0编辑  收藏  举报