datagrid原来的颜色是白色
当我鼠标移动到我的datagrid里某一行时,这一行的颜色变成红色,鼠标移开还是变成白色
如果你会的话,帮我解决一下,呵呵~~
当我鼠标移动到我的datagrid里某一行时,这一行的颜色变成红色,鼠标移开还是变成白色
如果你会的话,帮我解决一下,呵呵~~
解决方案 »
- 求救,ieweb_controls 无法显示
- 救急!IIS6.0发布MVC网站 图片及CSS\JS加载不了 路径问题 请看清描述
- NET关于在本机配置网站的问题
- 请问一个设置了超链接的hyperlink怎么在点击后自动禁用超链接功能?
- 点击日历控件出现 “未将对象引用设置到对象的实例。“
- asp和asp.net服务器上支持软件有什么区别?
- 用HttpModule做文件上传用到ReadEntityBody函数后就总是出现等待60秒
- 菜鸟求一SQL语句
- 怎样使datalist的数据从下往上排
- 非常感谢(孟子e章)提供的分页代码!
- 加密高手进来帮我解决这个问题啊!
- WebHtmlEditor 放在 ascx里就出问题了!
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='Red'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='white'")
End If
End Sub
VB的写法,C#的差不多
{
If (e.Item.ItemType = ListItemType.Item ||e.Item.ItemType = ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='Red'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='white'")
}}
{
If (e.Item.ItemType = ListItemType.Item ||e.Item.ItemType = ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='Red'")
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='white'")
}}