Black Diamond

Black Diamond

  • NA
  • 236
  • 108.7k

How to make my combobox autocomplete with multiple columns

Jun 28 2017 3:57 AM
Hi!
 
I want to ask some help this problem. I want my combobox autocomplete dropdown in how many columns and merge the rows in one combo box text.
 
 
 
=====================================================================
string conStringBranchFund = txtpath;
SqlConnection connBranchFund = new SqlConnection(conStringBranchFund);
connBranchFund.Open();
string query = "select AccountNumberBranch, AccountBank, AccountNumber from AccountNumBranch order by AccountNumber";
SqlCommand cmd = new SqlCommand(query, connBranchFund);
SqlDataReader reader = cmd.ExecuteReader();

while (reader.Read())
{

CbBranchFunds.Text = reader.GetString(0) + " (" + reader.GetString(1) + ") " + reader.GetString(2);
}
====================================================================
 
This code display only one row, the last row. I want to be drop completely  in how many columns ...thank you in advance.

Answers (8)