protected override void OnTextUpdate(EventArgs e) { DroppedDown = true; searchText = Text; SelectedIndex = findIndex(Text); Text = searchText; //when dropdown occurs it automatically select an item and writes it in the text place. To prevent this I just update the text SelectionStart = Text.Length; } private int findIndex(string text) { for (int i = 0; i < dataTable.Rows.Count; i++) if (dataTable.Rows[i][1].ToString().ToUpper().StartsWith(text.ToUpper())) return i; return -1; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)