title: Choosing initially selected value for a ComboBox with a List of KeyValuePair as DataSource
body: <p>I am creating a combobox from a <code>List</code> of <code>KeyValuePair&lt;int, string&gt;</code>. So far it has been working very well in offering the user the descriptive name while returning me a numeric id.<br/>However, whatever I try, I am not able to choose the initially selected value.</p>
  
  <pre><code>public StartUpForm()
  {
      InitializeComponent();
  
      FlowLayoutPanel flowLayout = new FlowLayoutPanel(); //This is necessary to protect the table, which is for some reason collapsing...
      flowLayout.FlowDirection = FlowDirection.TopDown;
      flowLayout.AutoSize = true;
      flowLayout.AutoSizeMode = AutoSizeMode.GrowAndShrink;
  
      var comboBox = new ComboBox();
  
      {
          var choices = new List&lt;KeyValuePair&lt;int, string&gt;&gt; ();
          choices.Add(new KeyValuePair&lt;int, string&gt;(1, "hello"));
          choices.Add(new KeyValuePair&lt;int, string&gt;(2, "world"));
          comboBox.DataSource = choices;
          comboBox.ValueMember = "Key";
          comboBox.DisplayMember = "Value";
          flowLayout.Controls.Add(comboBox);
      }
      Controls.Add(flowLayout);
  
      //None of these work:
      comboBox.SelectedValue = 2;
      comboBox.SelectedValue = 2.ToString();
      comboBox.SelectedValue = new KeyValuePair&lt;int, string&gt;(2, "world");
      comboBox.SelectedValue = "world";
      comboBox.SelectedItem = 2;
      comboBox.SelectedItem = 2.ToString();
      comboBox.SelectedItem = new KeyValuePair&lt;int, string&gt;(2, "world");
      comboBox.SelectedItem = "world";
  
      return;
  }
  </code></pre>
  
  <p>The result is always the same:</p>
  
  <p><a href="https://i.stack.imgur.com/qE5r5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qE5r5.png" alt="enter image description here"></a></p>
  
  <p>How can I choose the initially selected value in a <code>ComboBox</code> using as DataSource a <code>List&lt;KeyValuePair&lt;int, string&gt;&gt;</code>?</p>