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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ComboBoxAutoComplete Does not show the drop down list

Thread ID:

Created:

Updated:

Platform:

Replies:

82349 Jun 10,2009 07:17 AM UTC Jun 12,2009 10:03 AM UTC Windows Forms 1
loading
Tags: Tools
"Anna" Natalia Swanny Triana Sudiono
Asked On June 10, 2009 07:17 AM UTC

Hi,

I have a problem with ComboBoxAutoComplete.

I setup the element using the code below:


AutoCompleteStringCollection strcollection = new AutoCompleteStringCollection();
strcollection.Add("Test1");
strcollection.Add("Test2");
strcollection.Add("Test3");
strcollection.Add("Test4");
strcollection.Add("Item1");
strcollection.Add("Check4");
strcollection.Add("Test5");
strcollection.Add("Check6");

comboAutoComplete.AutoCompleteSource = AutoCompleteSource.CustomSource;
comboAutoComplete.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
comboAutoComplete.AutoCompleteCustomSource = strcollection;
comboAutoComplete.Items.Clear();

foreach (string str in strcollection)
{
comboAutoComplete.Items.Add(str);

}
comboAutoComplete.SelectedItem = comboAutoComplete.Items[0];
}


When I clicked on the drop-down button, the list was not shown properly. The drop-down list showed up and closed instantly. How do I fix this problem? Thank you.

Administrator [Syncfusion]
Replied On June 12, 2009 10:03 AM UTC

Hi Natalia,

Thank you for using Syncfusion products.

In ComboBoxAutocomplete control , the combobox drop down is overridden for showing the autocomplete dropdown . So instead of adding items to the items collection, add items to the autocomplete control using its DataSource property.

The following code snippet illustrates this.

[C#]

comboAutoComplete.AutoCompleteControl.DataSource = strcollection;

Please find the sample below that demonstrates this.

http://files.syncfusion.com/support/Tools.Windows/7.2.0.20/56844/main.htm

Please followup the incident 56844 for further queries.

Regards,
Jaya


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;