In C# Winforms, I have a textbox with AutoCompleteMode. When the user types some letters the suggestion list is shown Correctly. If an item in list is selected using (Keyboard)UP and Down key it could not Select an item. If i Select mean, it will get the first item in list..
How can i rectify this...Please Suggest..
Here My Code...
private void txt_Name_TextChanged(object sender, EventArgs e)
{
try
{
SqlDataReader datareader = qu.GetValue("English_Short");
AutoCompleteStringCollection local = new AutoCompleteStringCollection();
if (datareader.HasRows == true)
{
while (datareader.Read())
local.Add(datareader["English_Short"].ToString());
}
txt_Name.AutoCompleteMode = AutoCompleteMode.Suggest;
txt_Name.AutoCompleteSource = AutoCompleteSource.CustomSource;
txt_Name.AutoCompleteCustomSource = local;
}
catch (Exception)
{ }
}