zoukankan
html css js c++ java
GridView移动行变色
1.
protected
void
myGridView_RowDataBound(
object
sender, GridViewRowEventArgs e)
{
//
if (e.Row.RowType == DataControlRowType.Header)
//
{
//
e.Row.Attributes.Add("style", "background-image:url('./HeadImages/headeImage.jpg')");
//
}
if
(e.Row.RowType
==
DataControlRowType.DataRow)
{
//
e.Row.Attributes["onmouseover"] = "ItemOver(this)";
e.Row.Attributes.Add(
"
onmouseover
"
,
"
e=this.style.backgroundColor; this.style.backgroundColor='#EEEEEE'
"
);
e.Row.Attributes.Add(
"
onmouseout
"
,
"
this.style.backgroundColor=e
"
);
}
}
2.
e.Row.Attributes[
"
onmouseover
"
]
=
"
ItemOver(this)
"
;
if
(
!
objbeforeItem)
{
var
objbeforeItem
=
null
;
var
objbeforeItembackgroundColor
=
null
;
}
function
ItemOver(obj)
{
if
(objbeforeItem)
{
objbeforeItem.style.backgroundColor
=
objbeforeItembackgroundColor;
}
objbeforeItembackgroundColor
=
obj.style.backgroundColor;
objbeforeItem
=
obj;
obj.style.backgroundColor
=
"
#B9D1F3
"
;
}
查看全文
相关阅读:
How to print GETDATE() in SQL Server with milliseconds in time?
StarLink卫星网络如何工作
Chinasat16
天线增益计算
Schemachine
源代码之整洁代码
关于进程内缓存与分布式缓存
IOT物联网时代测试演化
互联网大促运维实践案例
Kubernetes应用场景
原文地址:https://www.cnblogs.com/cnaspnet/p/1242230.html
最新文章
ArcGIS modelbuilder 打开 遇到不正确的参数解决
ArcMap无法创建新样式,或将符号添加到样式
ArcGIS Pro开发Pro没有IWorkspace只有Geodatabase
await运算符只能用于异步方法中。请考虑用async修饰符标记此方法,并将其返回类型更改为Task...
Derwent Innovations Index(1963-)--德温特专利索引数据库(Web of Science)
Google Scholar Metrics谷歌学术指标 vs SCI IF
HTTP Header(协议头)与Keep-Alive模式详解
HTTP头部详解
Windows挂载NFS文件系统
在每个请求的.net HttpWebRequest上设置SecurityProtocol(Ssl3或TLS)
热门文章
c# 爬虫(三) 文件上传
c# 爬虫(二) 模拟登录
c# 爬虫(一) HELLO WORLD
c# 获取url参数值
solr管理界面详解
Excel如何快速去除某个符号后面的所有字符
抓取Web of Science经验分享
SCI个人用户注册
谨慎使用Encoding.Default
Windows Server 2016 更改远程桌面端口
Copyright © 2011-2022 走看看