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+ " '); ");
}
}
------解决方案--------------------学习