首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

gridview中点击行任意点,都选中该行,该如何写代码

2012-01-31 
gridview中点击行任意点,都选中该行,该怎么写代码?gridview中点击行任意点,都选中该行,该怎么写代码?(不是

gridview中点击行任意点,都选中该行,该怎么写代码?
gridview中点击行任意点,都选中该行,该怎么写代码?(不是c#)并调出非模式对话框。
小弟初学,望大哥大姐海涵赐教!!不胜感激!!


[解决办法]
protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add( "onclick ", "if(document.oldTr !=null){document.oldTr.runtimeStyle.cssText= ' ';}this.runtimeStyle.cssText= 'background-color:red ';document.oldTr=this;window.showModelessDialog( 'bb.aspx?id= "+e.Row.Cells[0].Text+ " '); "); } }
[解决办法]
学习

热点排行