this.textBox.text=this.datagrid.currentcell.text;
就行了

解决方案 »

  1.   

    以上放在datagrid的currentcellchange的事件里
      

  2.   

    这样的方法在我的C#.NET中无法实现,能不能换一种方法?急盼!
      

  3.   

    我这样做的:
    DropDownList ddl =new DropDownList();foreach (DataGridItem item in this.DataGrid1.Items)
    {
       ddl=(DropDownList)item.FindControl("DropDownList1"); 
       this.sqlCommand1.Parameters["@zc"].Value=ddl.SelectedItem.Value;
       this.sqlCommand1.Parameters["@id"].Value=item.Cells[0].Text;
       this.sqlCommand1.Connection.Open();
       this.sqlCommand1.ExecuteNonQuery();
       this.sqlCommand1.Connection.Close();
    }你可以 TextBox tb=new TextBox();
           tb=(TextBox)item.FindControl("TextBox1");
           tb.Text;