高亮显示GridView当前行

高亮显示GridView当前行

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='yellow',this.style.fontWeight='bold'");

        e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='white',this.style.fontWeight=''");

    }

protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        e.Row.Attributes.Add("onmouseover", "this.className='tdbgmouseover'");
        e.Row.Attributes.Add("onmouseout","this.className='tdbg'");
    }

posted @ 2008-09-17 14:52  南守拥  阅读(664)  评论(0编辑  收藏  举报