知道默认是蓝色 但是客户不要蓝色  我迷糊死了  刚才的帖 看到有说光棒效果的 但是我在DGV事件里没找到
RowDataBound事件啊 愁死 然后还缺少using引用 怎么办啊 就差这了

解决方案 »

  1.   

    rotected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            int i;
            for (i = 0; i <= GridView1.Rows.Count; i++)
            {
                //首先判断是否是数据行
                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");
                    //单击行的任意列会自动选中此行
                    e.Row.Attributes.Add("onclick", "__doPostBack('GridView1','Select$" + e.Row.RowIndex + "')");
                }
            }
    不存在么。你去datagridview里面的事件里面找
      

  2.   

    1楼,楼主说的是datatgridview,你说的是gridview