Hi Michael,
Thank you for using Syncfusion products.
Yes, your requirement to display the AutoComplete upon ButtonEdit Child button click, can be achieved by using its ProcessAutoComplete function. Please make use of the below code snippet.
Code Snippet[C#]:
private void buttonEditChildButton1_Click(object sender, EventArgs e) { this.autoComplete1.ActiveFocusControl = this.textBoxExt2; //To show the autoCompletePopup this.autoComplete1.ProcessAutoComplete(this.textBoxExt2.Text, string.Empty, Point.Empty); this.autoComplete1.ActiveFocusControl = null; } |
We have also prepared the sample for your reference and it can be downloaded from the below location.
Sample location : http://www.syncfusion.com/downloads/support/forum/119829/ze/ButtonEditAutoComplete92609859
Could you check with the attached sample and let us know whether the provided solution helps to achieve the reported requirement?
Please let us know if you need further assistance.
Regards,
Senthil
//Change parent form of the autoComplete this.autocomplete.ParentForm = this.ParentForm; // Set DataSource. this.buttonEditExt1.DataSource = view; //To set DisplayMember this.buttonEditExt1.DisplayMember = "place"; private object m_DataSource; /// <summary> /// Get/sets the DataSource for the ButtonEditExt /// </summary> public object DataSource { get { return m_DataSource; } set { this.m_DataSource = value; //Change parent form of the UserControl this.autocomplete.ParentForm = this.ParentForm; this.autocomplete.DataSource = value; this.autocomplete.SetAutoComplete(this.TextBox, AutoCompleteModes.MultiSuggestExtended); } } private string displayMember = string.Empty; /// <summary> /// Get/Sets the DisplayMember for the ButtonEditExt /// </summary> public String DisplayMember { get { return displayMember; } set { this.displayMember = value; if(this.displayMember != string.Empty) this.autocomplete.RefreshColumns(); foreach(AutoCompleteDataColumnInfo column in this.autocomplete.Columns) { if(column.ColumnName == value) { column.Visible = true; } else { column.Visible = false; } } } } |
if (!this.DesignMode && this.autocomplete.DataSource != null) { this.autocomplete.ActiveFocusControl = this.TextBox; //To show the autoCompletePopup this.autocomplete.ProcessAutoComplete(this.TextBox.Text, string.Empty, Point.Empty); } |