越过林子

  -- 代码中的bugs,够我吃上一辈子了。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

高亮显示GridView当前行

Posted on 2006-03-08 23:42  啄木鸟  阅读(2499)  评论(1编辑  收藏  举报
    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=''");

    }

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dynstyle/styles.asp
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/howto/activatingtext.asp