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'
"
);
}
}
查看全文
相关阅读:
v-model
CSS background 属性
渐变背景
mint ui的field用法和修改样式的方法
js 数组包含
password 密码查询
web 单一平台登录逻辑
内存共享锁业务逻辑(原创)
无限分类树操作
根据日期获取,x岁x月x天
原文地址:https://www.cnblogs.com/ghx88/p/401171.html
最新文章
yarn 代替 npm
es6-解构赋值
promise intro2-用法
tips06-模板字符串 `${}` 和 startsWIdth()
jquery备忘录
web API-js
jsonp和cors 以及反向代理 解决跨域问题及其原理
导出字符串拼接jquery
jquery,ztree,anglarjs使用(一)
anglarjs结合jquery字符长度限制
热门文章
时间戳转时间
bootstrap表格结合anglarjs 含全选与全不选(-)
key value值的获取
layui,jquery,angularjs结合使用日期限制 (爬坑一)
layui 日期插件
附件上传
jquery弹出框
前端性能优化的方法
改变this指向的方法
引入组件
Copyright © 2011-2022 走看看