protected void gvAdmin_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#dcdcdc';");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor= c;");
}
}
Gridview行变颜色
最新推荐文章于 2023-06-14 10:13:13 发布
本文介绍了一个使用C#实现的网格视图中行数据绑定事件处理方法,该方法为每行添加了鼠标悬停时改变背景颜色的效果,增强了用户体验。
185

被折叠的 条评论
为什么被折叠?



