Category / Section
How to display AutoComplete popup upon demand?
1 min read
Normally, the AutoComplete control popup is displayed upon user input in its Target control. It is also possible to display the AutoComplete popup programmatically, by using its function, ProcessAutoComplete.
The following code example demonstrates the same.
C#
//Sets the AutoComplete Mode as suggestion. this.autoComplete1.SetAutoComplete(this.textBoxExt2, Syncfusion.Windows.Forms.Tools.AutoCompleteModes.AutoSuggest); //Sets the focus on TextBoxExt. this.autoComplete1.ActiveFocusControl = this.textBoxExt2; //Shows the autoCompletePopup. this.autoComplete1.ProcessAutoComplete(this.textBoxExt2.Text, string.Empty, Point.Empty);
VB
'Sets the AutoComplete Mode as suggestion. Me.autoComplete1.SetAutoComplete(Me.textBoxExt2, Syncfusion.Windows.Forms.Tools.AutoCompleteModes.AutoSuggest) 'Sets the focus on TextBoxExt. Me.autoComplete1.ActiveFocusControl = Me.textBoxExt2 'Shows the autoCompletePopup. Me.autoComplete1.ProcessAutoComplete(Me.textBoxExt2.Text, String.Empty, Point.Empty)
Note:
When AutoComplete mode is set to disabled, the AutoComplete process is stopped.
Figure 1: AutoComplete popup not applied to ButtonEdit
Figure 2: AutoComplete popup on ButtonEdit on clicking the ButtonEditChild button
Sample Links: