title: How to set SelectedValue of DropDownList in GridView EditTemplate
body: <p>I am trying to do <a href="https://stackoverflow.com/questions/2402288/using-dropdownlist-in-edittemplates-of-a-gridview"><strong>this</strong></a> as asked earlier. The only difference that I found is additional List item that was included in above code.</p>
  
  <p>I tried to use <code>AppendDataBoundItems=true</code> but it is still not working. I also want to set the its default value to the value that was being displayed in label of itemtemplate i.e. DropDownList's <code>SelectedValue='&lt;%# Eval("DepartmentName") %&gt;'</code> but thie property is not available to me in dropdownlist.
  What could be the reason. ??</p>
  
  <pre><code>&lt;EditItemTemplate&gt;
      &lt;asp:DropDownList ID="ddlDepartment_Edit" runat="server" 
          DataSourceID="dsDepartment_Edit" DataTextField="DepartmentName" 
          DataValueField="PK_DepartmentId"&gt;
      &lt;/asp:DropDownList&gt;
      &lt;asp:SqlDataSource ID="dsDepartment_Edit" runat="server" 
          ConnectionString="&lt;%$ ConnectionStrings:BlackHillsConnect %&gt;"  
          ProviderName="System.Data.SqlClient" SelectCommand="sp_GetDepartmentDropDown" 
          SelectCommandType="StoredProcedure"&gt;
      &lt;/asp:SqlDataSource&gt;                                 
  &lt;/EditItemTemplate&gt;
  &lt;ItemTemplate&gt;
      &lt;asp:Label ID="lblDepartmentName" runat="server" Text='&lt;%# Eval("DepartmentName") %&gt;' &gt;
      &lt;/asp:Label&gt;
  &lt;/ItemTemplate&gt;   
  </code></pre>
  
  <p>I am using <code>GridView</code></p>