鼠标停留在GridView某一行时 行的颜色改变
protected void gvdegreetype_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='GhostWhite'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='white'");
}
}
---------------------------------------------
可以选择GRIDVIEW控件,然后双击RowDataBound事件
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
//当鼠标移到的时候设置该行颜色为"", 并保存原来的背景颜色
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#6699CC'");
//当鼠标移走时还原该行的背景色
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
}
asp.net 鼠标停留在GridView某一行时颜色改变.rar
需积分: 3 24 浏览量
2008-03-14
23:33:03
上传
评论
收藏 599B RAR 举报
lixiahe
- 粉丝: 5
- 资源: 96
最新资源
- [检测统计]北雨访问记数器系统_bycount.rar
- HonoCMS 内容发布系统 v1.0_honocms_cn_CMS程序开发模板(使用说明+源代码+html).zip
- 手机在线点餐模板.zip
- [搜索链接]Page Rank查询_pagerank.rar
- matlab imu和视觉里程计 kalman滤波器 进行融合.rar
- matlab 该模拟器由构成IEEE802.11a协议物理层的多个部分集成
- mmexport1713552623466.jpg
- matlab Physical layer of the IEEE 802.11ac simulator.zip
- 仿药房网手机wap药店网站模板_网站开发模板含源代码(css+html+js+图样).zip
- 超声波测距实验_单片机C语言实例(纯C语言源代码).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0