飘叶
飘零的叶子,也要享受生活
posts - 476,  comments - 958,  trackbacks - 0
找了很久的改变datagrid底色的代码。本代码是用户鼠标经过的时候改变底色的:

vb.net代码:
  If e.Item.ItemType <> ListItemType.Header And e.Item.ItemType <> ListItemType.Footer And e.Item.ItemType <> ListItemType.Separator Then
            e.Item.Attributes("onmouseover") = "this.bgColor='#61AAF5';"
            e.Item.Attributes("onmouseout") = "this.bgColor='#ffffff';"
        End If

c#代码:
if (e.Item.ItemType != ListItemType.Header && e.Item.ItemType != ListItemType.Footer && e.Item.ItemType != ListItemType.Separator)
   {
      e.Item.Attributes["onmouseover"] = "this.bgColor='#61AAF5';";
    e.Item.Attributes["onmouseout"] = "this.bgColor='#ffffff';";
    e.Item.Attributes["onclick"] = GetPostBackClientHyperlink(csel, "");
              
   } //if结束
posted on 2005-09-15 11:38 飘叶 阅读(196) 评论(0)  编辑  收藏 所属分类: 网上经典东东

<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

常用链接

留言簿(9)

随笔分类(473)

随笔档案(474)

文章分类(17)

文章档案(16)

收藏夹(5)

好友Blog

名人博客

求职

网上杂志

医生博客

有关IT信息

在线工具

在线听歌

最新随笔

搜索

  •  

积分与排名

  • 积分 - 166382
  • 排名 - 19

最新评论

阅读排行榜

评论排行榜