|G|这次不是Flash问题!请问怎么用javascript,选中GridView,点击GridView返回内容
请问怎么用javascript,选中GridView,点击GridView返回内容到javascript?
<asp:GridView id= "gGridView1 " runat= "server ">
cs:
string strConn = "Provider=Microsoft.Jet.OleDb.4.0;Data Source= " + Server.MapPath( ".. ") + "\\BalaSQL.xls;Extended Properties=\ "Excel 8.0;\ " ";
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
OleDbDataAdapter da = new OleDbDataAdapter( "SELECT ID as 编号,BALAID as 结算编号,BALANAME as 结算名称 FROM [sheet1$] ", conn);
DataSet ds = new DataSet();
da.Fill(ds);
DataTable DT = ds.Tables[0].Copy();
conn.Close();
GridViewList1.DataSource = DT;
GridViewList1.DataBind();
------解决方案--------------------不太清楚,还真没这么用过.
------解决方案--------------------http://www.cnblogs.com/zqc5242519/archive/2007/02/02/638112.html
http://community.csdn.net/Expert/TopicView3.asp?id=5019270
------解决方案--------------------后台代码应该好实现吧,
不知道Js怎么实现…
------解决方案--------------------在rowbound事件中
e.Row.Attributes.Add( "onclick ", "document.getElementById( "txt1 ").vlaue=this.cells[1].innerText ");