We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ComboBoxAutoComplete Behavior

Good afternoon. I'm having a bit of unusual behavior with the ComboBoxAutoComplete control.

I have programmatically configured the AutoComplete control of the ComboBoxAutoComplete control to use strongly-typed object collection as its datasource (the datasource on the AutoComplete control is set with this collection), and have specified the "AutoCompleteMode" to AutoSuggest. When entering text into the ComboBox, the AutoComplete popup appears as expected and filters the list as I provide more information.

However, upon losing focus and then returning to the control, entering new text does not cause the AutoComplete control to appear; the matching functionality still appears to work, as typing different text into the ComboBox will find a variety of matches on the list. The problem is that the Popup does not appear again, which I thought should be normal behavior given that the mode is set to AutoSuggest. It seems like it reverts from AutoSuggest mode to AutoAppend mode.

Is there a property on the ComboBox or AutoComplete control that must be configured properly for the popup to reappear, or is there something else that must be done? Is this possibly a bug with the control, and if so, is there a workaround?

Thanks for any help you can provide.

2 Replies

AR Anupama Roy Syncfusion Team November 1, 2006 05:23 AM UTC

Hi John,

We have investigated code related with this behavior. Looks like ComboBoxAutoComplete.AutoCompleteControl.SetAutoComplete() method is misused due to public access levels (also I suppose it's just an architectural flaw). Before and during drop down of suggest box and after it's closed, this method is called several times and sets different auto complete modes.To fix this, ComboBoxAutoComplete needs massive refactoring and the current architecture doesn't allow us to fix this.


As a workaround could you please try setting the AutoSuggest mode in the TextChanged event of ComboBoxAutoComplete.

private void comboBoxAutoComplete1_TextChanged(object sender, System.EventArgs e)
{


this.comboBoxAutoComplete1.AutoCompleteControl.SetAutoComplete(this.comboBoxAutoComplete1 ,

Syncfusion.Windows.Forms.Tools.AutoCompleteModes.AutoSuggest );


}

Thanks for choosing Syncfusion products.

Regards,

Anu.


AD Administrator Syncfusion Team November 1, 2006 03:39 PM UTC

Anu,

Thanks for your response. We will implement the workaround as suggested, and if it does not provide the desired functionality, we will forego the usage of AutoSuggest and limit our inputs to the default AutoAppend.

Thanks again.

>Hi John,

We have investigated code related with this behavior. Looks like ComboBoxAutoComplete.AutoCompleteControl.SetAutoComplete() method is misused due to public access levels (also I suppose it's just an architectural flaw). Before and during drop down of suggest box and after it's closed, this method is called several times and sets different auto complete modes.To fix this, ComboBoxAutoComplete needs massive refactoring and the current architecture doesn't allow us to fix this.


As a workaround could you please try setting the AutoSuggest mode in the TextChanged event of ComboBoxAutoComplete.

private void comboBoxAutoComplete1_TextChanged(object sender, System.EventArgs e)
{


this.comboBoxAutoComplete1.AutoCompleteControl.SetAutoComplete(this.comboBoxAutoComplete1 ,

Syncfusion.Windows.Forms.Tools.AutoCompleteModes.AutoSuggest );


}

Thanks for choosing Syncfusion products.

Regards,

Anu.

Loader.
Live Chat Icon For mobile
Up arrow icon