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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

After changing autoComplete DataSource It still suggests for history items.

Thread ID:





130835 Jun 6,2017 03:15 PM UTC Jun 12,2017 03:50 AM UTC WinForms 3
Tags: AutoComplete
Asked On June 6, 2017 03:15 PM UTC

I am using autoComplete over a textbox which suggests items after we start typing over it. The suggestion list or the datasource assigned to the autocomplete needs to change its values after the index changed of a comboBox.
Ex- I have a comboBox of Country and textBox of State . After I change the Country the suggestion for state should change. However , it works quite well till the new list have anything to suggest. If it the suggestion list doesn't have anything to suggest then it goes and pick from the old list.
   Like - I select Country as INDIA and start typing over the State textbox. 
   For B - Its giving me suggestion as Bombay... 
   For Bi - Expected result is It should not suggest anything as I don't have any state list which starts or contains "Bi" . 
   But unfortunatly it suggest me Birmingham which was in earlier suggestion list for Country England.

Tried with assigning Nothing to datasource and ResetHistory of autocomple but still no luck. Please suggest some way around to achieve this.
Thanks in advance.


Priyanga Balasubramaniam [Syncfusion]
Replied On June 7, 2017 11:08 AM UTC

Hi Priyadarshi,

Thank you for using Syncfusion products.

AutoCompleteCustomSource of TextBox holds the old values. So, it displays the old values in suggestion. We have prepared the simple sample to meet your requirement. In this sample, in SelectedIndexChanged event of ComboBox cleared the AutoCompleteCustomSource of TextBox before assigning the new collection.

Please download the sample from the below location.


Priyanga B

Replied On June 9, 2017 07:19 AM UTC

Hi Priyanga,
Thanks for quick response. It worked for me.


Keerthana Jegannathan [Syncfusion]
Replied On June 12, 2017 03:50 AM UTC

Hi Priyadarshi, 
Thanks for your update. 
Please let us know if you need further assistance on this. 
Keerthana J 


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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