We have received an e-mail which you have sent to a no reply
email account that is used to notify you about a received response in our online ticketing system related to this ticket.
Your response is as follows:
I'm not using INotifyCollectionChanged collection nor am I binding in xaml. I am setting SuggestionSource to a List<string> in c# code. When I update the List<string> with a new entry, it is not reflected in the AutoComplete box - not until the program runs again. There must be something I can do to "refresh" the control so that it sees the revised List.
My app is not some "hello world" app that can use static binding against a datasource. I need to dynamically change sources in code. for instance, sometimes depending on the language being used as in a translator app.
Before moving on to the topic, I would kindly like to ask you to use our support ticketing system to get back to us since otherwise it might happen that we do not notice your response.
Back to your case: in the .NET framework there are some patterns related to scenarios where you are using a collection as a source for a control and would like the control to track the changes in the collection. You can either use the ObservableCollection<T> class (http://msdn.microsoft.com/en-us/library/ms668604.aspx) or simply implement the INotifyCollectionChanged interface in your collection. RadAutoCompleteBox itself knows this interface and will handle any changes in the source collection in case this collection implements it. Since RadAutoCompleteBox internally uses a special approach to optimize the filtering process, it does not directly use the source collection, but it stores a sorted version of it in an internal collection. Therefore, it is essential to provide a INotifyCollectionChanged implementation in case you would like your collection changes be tracked.
I hope this helps.
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>