Loading

GridView移动显示颜色

if (e.Row.RowType == DataControlRowType.DataRow)
        {
            //当鼠标停留时更改背景色
            e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#EBFBBA'");
            //当鼠标移开时还原背景色
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");

……………………

   }

posted @ 2012-04-17 11:22  GerryGe  阅读(237)  评论(0编辑  收藏  举报