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.

After changing autoComplete DataSource It still suggests for history items.

Thread ID:

Created:

Updated:

Platform:

Replies:

130835 Jun 6,2017 11:15 AM Jun 11,2017 11:50 PM Windows Forms 3
loading
Tags: AutoComplete
Priyadarshi
Asked On June 6, 2017 11:15 AM

Hi,
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.

Regards,
Priyadarshi

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

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.

Sample:F130385

Regards,
Priyanga B


Priyadarshi
Replied On June 9, 2017 03:19 AM

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

Thanks,
Priyadarshi



Keerthana Jegannathan [Syncfusion]
Replied On June 11, 2017 11:50 PM

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


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.

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.

;