I have written following code on Textbox Validated event :
private void txtHbhakt1_Validated(object sender, EventArgs e)
{
//MessageBox.Show("Validated");
txtHbhakt1.AutoCompleteCustomSource.Add("abcd");
txtHbhakt1.AutoCompleteCustomSource.Add("abcd1");
txtHbhakt1.AutoCompleteCustomSource.Add("abcd2");
txtHbhakt1.AutoCompleteCustomSource.Add("abcd3");
}
i run the application and Hit TAB Key on Textbox.. it happens nothing.. why?
whenever i use autocompleteCustomSource on Validated or Leave event of Textbox TAB key doesn’t working ..
what is the solution?
Thanks..
The Tab key action seems to get conflicting orders when you are updating the custom source during the validation event.
A simple work around is to add the sources after the event has passed. Using
BeginInvokeseems to fix the problem: