光标移动事件。 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");
            }
        }
posted @ 2007-09-14 16:19  wj-conquer  阅读(579)  评论(0编辑  收藏  举报