title: Populating a DataGridViewComboBoxColumn with dictionary keys and values
body: <p>I have a dictionary that has as its keys a three letter country code, and as its values the name of the country.</p>
  
  <pre><code>Dictionary&lt;string, string&gt; CountryList=new Dictionary&lt;string, string&gt;();
  </code></pre>
  
  <p>I also have a DataGridView and a DataTable. What I'd like to do is to create a DataGridViewComboBoxColumn for certain columns in my DataTable-columns that display country information. So, for example, one of my columns in my DataTable is called <code>Country</code>, and I'd like for that column to have a drop down combo box that displays the name of the country, and that when selected, populates the cell in the DataTable with the key from the dictionary (the three letter code). However, I'm totally stumped as to how to do this. Do I have to set the DataSource to the keys, and the DisplayMember to the values? I tried that, and got an error:</p>
  
  <pre><code>DataGridViewComboBoxColumn buildCountries = new DataGridViewComboBoxColumn();
  buildCountries.HeaderText = "List of Countries";
  buildCountries.DataSource = CountryList.Keys.ToString();
  buildCountries.DisplayMember = CountryList.Values.ToString();
  </code></pre>
  
  <blockquote>
    <p>Complex DataBinding accepts as a data source either an IList or an IListSource</p>
  </blockquote>
  
  <p>I'm not sure how to go about doing this.</p>