我使用以下数据填充组合框的数据库值:
public void fillcombo()
{
using (SqlConnection myDatabaseConnection = new SqlConnection(myConnectionString.ConnectionString))
{
myDatabaseConnection.Open();
using (SqlCommand mySqlCommand = new SqlCommand("Select Description from LibraryCongressClassificationOutline", myDatabaseConnection))
using (SqlDataReader sqlreader = mySqlCommand.ExecuteReader())
{
while (sqlreader.Read())
{
string Desc = sqlreader.GetString(sqlreader.GetOrdinal("Description"));
comboBox1.Items.Add(Desc);
}
}
}
}
当我输入comboBox时我将如何过滤数据并自动显示comboxSelection中的所有数据(不知道它叫什么)而不点击这个
答案 0 :(得分:0)