循环GridView
生活随笔
收集整理的這篇文章主要介紹了
循环GridView
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
//鼠標(biāo)覆蓋則變色該行
protected void dataTable_RowDataBound(object sender, GridViewRowEventArgs e){
if(e.Row.RowType == DataControlRowType.DataRow){
//當(dāng)鼠標(biāo)停留時更改背景色
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#7a7b7d'");
//當(dāng)鼠標(biāo)移開時還原背景色
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
//循環(huán)GridView每一行
var i=e.Row.RowIndex;
//循環(huán)找每一行的控件
e.Row.FindControl("控件ID")
轉(zhuǎn)載于:https://www.cnblogs.com/illegal/p/6374040.html
總結(jié)
以上是生活随笔為你收集整理的循环GridView的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MySQL5.7.17绿色版安装
- 下一篇: 把一个函数作为参数传入到函数中