请问怎么用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();

解决方案 »

  1.   

    请问怎么实现?
    比如
    左边有个TextBox
    你输入1 就选中第一行
    输入2 就选种第2行然后你点第一行 就把第一行的某值传到左边 TextBox
    如同!
      

  2.   

    http://www.cnblogs.com/zqc5242519/archive/2007/02/02/638112.html
    http://community.csdn.net/Expert/TopicView3.asp?id=5019270
      

  3.   

    在rowbound事件中e.Row.Attributes.Add("onclick","document.getElementById("txt1").vlaue=this.cells[1].innerText");