title: how to access templatefield from code behind
body: <p>the reason why i am looking to update dynamic is because i am using objectdatasource and my objectdatasource have a collection of object and within that object i have another object that i wanted to access so for an example:</p>
  
  <pre><code>+Student
    ......
    ......
    ......
    -Courses
      .........
      .........
      Name
  </code></pre>
  
  <p><strong>Update end</strong></p>
  
  <p>how do i bind templatefield from code-behind?</p>
  
  <pre><code>&lt;asp:Gridview ID="gridview1" runat="Server"&gt;
  &lt;columns&gt;
   &lt;asp:TemplateField HeaderText="Name" SortExpression="Name"&gt;
                      &lt;ItemTemplate&gt;                       
                      &lt;/ItemTemplate&gt; 
                  &lt;/asp:TemplateField&gt;
  
  &lt;/columns&gt;
  &lt;/asp:Gridview&gt;
  </code></pre>