title: How to populate combobox from database C#?
body: <p>I want to fill my combobox with names from a database. Is it possible that in 1 combobox 2 columns will fill to it? For example: I have 2 columns, <code>Name</code> and <code>Position</code>. I want to put the name in the combobox with the corresponding position.</p>
  
  <p>example:</p>
  
  <pre><code>Name                        Position
  ---------------------------------------------
  jack                        President
  jill                        President
  maria                       Vice President
  john                        Secretary
  </code></pre>
  
  <p>here's my code:</p>
  
  <p>{</p>
  
  <pre><code>        DataTable table = new DataTable();
          using (SqlConnection sqlConn = new SqlConnection("my connection"))
  
          {
  
           using (SqlDataAdapter da = new SqlDataAdapter(@"SELECT Name, Position FROM CandidateTable", sqlConn))
  
           da.Fill(table);
  
           }
  
           comboBox1.DataSource = table;
  
          comboBox1.DisplayMember = "Name";
  
          comboBox1.ValueMember = "Position";
  </code></pre>
  
  <p>}</p>
  
  <p>NOTE: i want to fill my combobox with the name of jack and jill only bcoz they have the same Position. and the other names are in another combobox also.. not in president combobox.. i want to have a combobox that separate position.. you get my english? </p>