title: ComboBox cannot convert from KeyValuePair to Integer
body: <p>I am getting a DataBinding error where my ComboBox are binded to a <code>KeyValuePair</code> list and the value stored to the <code>DataBase</code> is an integer. </p>
  
  <p>How do I go about converting it?</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>Private Sub SetupeCombo()
       Dim comboSource = New List(Of KeyValuePair(Of Integer, String))
  
       For Each o In _List
            comboSource.Add(New KeyValuePair(Of Integer,String)(o.ID, o.Details))
       Next
  
       comboBox1.DisplayMember = NameOf(Table.Details)
       comboBox1.ValueMember =  NameOf(Table.ID)
       comboBox1.DataSource = New BindingSource(comboSource, Nothing)
  End Sub
  </code></pre>
  
  <pre><code>Public Sub BindComboBox()
       Dim comboBoxBindings = comboBox1.DataBindings.Add(NameOf(ComboBox.SelectedValue), dataSource, NameOf(dataSource.ID), True, DataSourceUpdateMode.OnPropertyChanged, String.Empty)        
       AddHandler comboBoxBindings.BindingComplete, AddressOf comboBoxBindings _BindingComplete
  End Sub
  </code></pre>
  
  <pre><code>Private Sub comboBoxBindings_BindingComplete(ByVal sender As Object, ByVal e As BindingCompleteEventArgs)
        If e.BindingCompleteState &lt;&gt; BindingCompleteState.Success Then MessageBox.Show("Test: " &amp; e.ErrorText)
  End Sub
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <blockquote>
    <p>Test: Value[1, TestValue] cannot be converted to a type 'ID'</p>
  </blockquote>