title: use of combobox ValueMember and DisplayMember
body: <p>I have an excel file which has two columns (1. Name and 2. Value) which I want to bind to a ComboBox.</p>
  
  <p>When I set the <code>DisplayMember</code> to <em>name</em> it shows the all the values from the Name column in the Excel file.</p>
  
  <p>I would like to get a similar dropdown as in asp.net controls with a text field and a value field so that when I select the text field then value field can be obtained using background code.</p>
  
  <p>How can I do in ComboBox(WinForms)?</p>
  
  <p>i am using following code.</p>
  
  <pre><code>String strConn = "Provider=Microsoft.jet.OLEDB.4.0;" + "Data Source="C:\vipin.xls"+ "Extended Properties=Excel 8.0;";
  DataSet ds = new DataSet();          
  OleDbDataAdapter da = new OleDbDataAdapter("SELECT [name] FROM [Sheet1$] where Component=1 ", strConn);          
  da.Fill(ds);
  dataGridView1.DataSource = ds.Tables[0].DefaultView;            
  comboBox1.DataSource = ds.Tables[0].DefaultView;
  comboBox1.DisplayMember = "name";
  </code></pre>