title: populate textbox text in gridview C#
body: <p>Could someone help me with the following problem please.
  I have a gridview with 2 columns in it. I populate the first column with labels from my datatable with nhibernate criteria. In the second column, i got textboxes. I want to populate them to but i cant get it work. I have this so far:</p>
  
  <pre><code>DataTable dt = new DataTable();
    dt.Columns.Add("Name", typeof(string));
  
  foreach (Tabelobject item in list)
                      {
                          DataRow NewRow = dt.NewRow();
  
                          Label lbl = new Label();
                          lbl.Text = item.objectName;
  
                          foreach (GridViewRow row in GridView1.Rows)
                          {
  
  
                              TextBox txt = row.Cells[0].FindControl("Textbox1") as TextBox;
  
  
  
                               txt.Text = item.objectValue;
                           }
                          NewRow[0] = lbl.Text;
  
                          dt.Rows.Add(NewRow);
                      }
  
                      GridView1.DataSource = dt;
  
                      GridView1.DataBind();
  </code></pre>
  
  <p>in aspx i have to following code:</p>
  
  <pre><code>&lt;asp:BoundField DataField="Name" HeaderText="Name" /&gt;
  
  &lt;asp:TemplateField HeaderText="Value"&gt;
    &lt;ItemTemplate&gt;
   &lt;asp:TextBox ID="Textbox1" runat="server"&gt;  &lt;/asp:TextBox&gt; 
   &lt;/ItemTemplate&gt;
   &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>Im trying to find the textbox control and fill it with the object values. Its not working so far, maybe you guys can help me on my way. </p>