title: DropDownList has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value
body: <p>I keep getting the above error in the title line and it makes no sense, because I am using a sample table with only 5 records and each record has a value as per the drop down menu. </p>
  
  <p>This is my code used to declare the drop down list. I have joined two tables in my SQL data source to reflect what I want populated in the grid view and have hidden columns as necessary. I am using the same data source to populate the drop down list any help would be most appreciated</p>
  
  <pre><code>&lt;asp:DropDownList ID="DropDownListCurrency" runat="server" 
                    CausesValidation="True" DataSourceID="GridView" 
                    DataTextField="Currency" DataValueField="Currency_ID" 
                    AppendDataBoundItems="True"&gt; 
  
            &lt;asp:ListItem Value="0" Text="&amp;lt;Select&amp;gt;" Enabled="True"&gt;&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/GIIqZ.png" alt="enter image description here"></p>
  
  <pre><code>protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
  {
      try 
      {
          GridViewRow row = GridView1.SelectedRow; 
  
          AccountNumber.Text = (string)row.Cells[0].Text;
          ....
  
          DropDownListCurrency.SelectedValue = (string)row.Cells[8].Text;
      }
      catch (Exception ex)
      {
          Console.WriteLine("{0} Exception caught.", ex);
      }        
  }
  </code></pre>