title: databind gridview edititemtemplate dropdownlist with sql statement
body: <p>I have a gridview with the following code:</p>
  
  <pre><code>&lt;asp:TemplateField HeaderText="Column1"&gt;
      &lt;EditItemTemplate&gt;
          &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Bind("Column1") %&gt;'&gt;&lt;/asp:Label&gt;
      &lt;/EditItemTemplate&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:DropDownList ID="DropDownList1" runat="server" Width="125px"&gt;
      &lt;/asp:DropDownList&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>I want to bind a sql statement to populate the dropdownlist...</p>
  
  <pre><code>select Column1 from Table1
  </code></pre>
  
  <p>would I do this through the code behind? any information is appreciated? Also based on the selection the user makes with this dropdownlist, I want to populate the next column (column2) with the corresponding data... Need assistance with that too... </p>
  
  <p>I am unfamiliar with template fields, I can work with a gridview binding in code behind and through the html but templatefields is like another language... I appreciate the help!!</p>