我用数据库值填充组合框:
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中自动显示所有数据(不知道它叫什么)而不点击它