高亮显示GridView当前行

it2022-05-09  23

高亮显示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'");     }

转载于:https://www.cnblogs.com/nanshouyong326/archive/2008/09/17/1292567.html

相关资源:数据结构—成绩单生成器

最新回复(0)