title: getting value of combobox to textbox
body: <p>using query i have called two columns value from database into one column. the point is now i want to select a value form combobox and put one column value into textbox.</p>
  
  <p>e.g</p>
  
  <p>two column values from database into combobox below</p>
  
  <p>10001 haider  &lt;------ when i select this index i want only haider to be viewed into the textbox</p>
  
  <p>10002 fahad</p>
  
  <p>10003 aitazaz</p>
  
  <p>the snippet which i have used for calling the two colums value from database is: </p>
  
  <pre><code>public void account()
          {
              con.Open();
              cmd.Connection = con;
              cmd.CommandText = "SELECT acc_no, acc_name FROM accounts_record";
              MySqlDataAdapter adpt = new MySqlDataAdapter(cmd);
              DataSet ds = new DataSet();
              adpt.Fill(ds);
  
              for (int i = 0; i &lt; ds.Tables[0].Rows.Count; i++)
              {
                  cbacc.Items.Add(ds.Tables[0].Rows[i][0] + "   " + ds.Tables[0].Rows[i][1]);
              }
  
              con.Close();
          }
  </code></pre>