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
"
;
}
查看全文
相关阅读:
交换技术 天高地厚
【转载】VirtualBox中双虚拟机安装部署OpenStack指南 天高地厚
Redo log 刷入磁盘示意图 天高地厚
分布式环境下session的存储的几个解决方案 天高地厚
【转载】mysql 日志管理 天高地厚
等待类型的分类 天高地厚
android gamil.com登录设置
android : Avoiding Memory Leaks
用点数据包存你的绘图信息
android 9patch (讲的很不错,相当全面:转)
原文地址:https://www.cnblogs.com/cnaspnet/p/1242230.html
最新文章
C#中的partial class(部分类)(转)
部分方法
接口(笔记2)
ado.net和linq over dataset 笔记(1)
接口(笔记)显示实现和隐式实现
什么是mode collapse模式崩溃?
如何理解深度学习中的embedding?
python从路径中获取文件名的三种方式
python读取某一个文件夹下的所有图片
什么是消融实验(Ablation experiment)?
热门文章
论文阅读笔记large scale gan training for high fidelity natural image synthesis(biggan)
OpenCV Error: Unspecified error (could not find a writer for the specified extension) in imwrite
论文阅读笔记CVPR2020 Semantic Image Manipulation Using Scene Graphs
ScrollWidth offsetWidth clientWidth
Asp.net学习笔录
备份恢复数据库
C#调PowerShell在SCVMM中创建虚拟机时,实时显示创建进度 天高地厚
GPFS在Linux下安装过程简述 天高地厚
串口通信 天高地厚
Tomcat 的介绍及 web 应用程序的部署 天高地厚
Copyright © 2011-2022 走看看