zoukankan
html css js c++ java
GridView技巧收集
1.高亮显示GridView当前行
protected
void
GridView1_RowDataBound(
object
sender, GridViewRowEventArgs e)
{
if
(e.Row.RowType
==
DataControlRowType.DataRow)
{
e.Row.Attributes.Add(
"
onmouseover
"
,
"
this.style.backgroundColor='yellow',this.style.fontWeight='bold'
"
);
e.Row.Attributes.Add(
"
onmouseout
"
,
"
this.style.backgroundColor='white',this.style.fontWeight=''
"
);
}
}
或
/**/
///
<summary>
///
使GridView实现onMouseOver加亮的方法,需要将方法加在RowDataBound事件中。
///
</summary>
///
<param name="e">
GridViewRowEventArgs
</param>
public
static
void
GridViewStyle(GridViewRowEventArgs e)
{
if
(e.Row.RowType
==
DataControlRowType.DataRow)
{
e.Row.Attributes.Add(
"
onmouseover
"
,
"
this.className='tdbgmouseover'
"
);
e.Row.Attributes.Add(
"
onmouseout
"
,
"
this.className='tdbg'
"
);
}
}
查看全文
相关阅读:
n9多媒体不显示图片处理方法
STM32全球唯一ID读取方法
VS2008+QT+CYAPI开发USB程序问题
QT对话框中show和exec的区别
华硕T20信号差的解决办法
使用JTAG方式配置EPCS芯片时显示容量不够的解决方法
QT中使用中文
MODBUS CRC16
递归的四条基本法则
Java代码混淆和加密Jocky
原文地址:https://www.cnblogs.com/ghx88/p/401171.html
最新文章
C#:接口
C#:部分类,静态类
C#:抽象类和抽象函数, 密封类和密封方法
C#:重载、重写、隐藏的定义
C#:扩展方法和外部方法
C#:定制类型的数组,Array类
C#:const 和readonly的区别
那些荡气回肠的句子
纪念
在.net中如何判断session的值是否为空?
热门文章
把一张图片作为背景平铺 css样式
读着,有些心酸
团购倒计时抢购功能(JS代码)
崩溃。。。
用Jmail组件发送邮件
动网论坛首页版块图片不显示问题
天长地久
FAT32中文版分析+补充(2)
关于CY7C68013A在Keil中代码及数据地址配置的问题
使用68013cyapi时传输速度慢的解决方案
Copyright © 2011-2022 走看看