越过林子

  -- 代码中的bugs,够我吃上一辈子了。
posts - 9, comments - 8, trackbacks - 0, articles - 2
  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理

高亮显示GridView当前行

Posted on 2006-03-08 23:42 啄木鸟 阅读(1891) 评论(1)  编辑 收藏 网摘 所属分类: ASP.Net 2.0
    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

Feedback

#1楼    回复  引用    

2006-04-24 14:41 by xingfu [未注册用户]
好,不过在datagird控件里有这么:if(e.item.itemstyle==listitemAlternatingItem || e.Item.ItemType == ListItemType.Item)在girdview中怎么写相应的语句 ?




标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
该文被作者在 2006-03-08 23:47 编辑过
Google站内搜索

相关文章:

相关链接: