This is a migrated thread and some comments may be shown as answers.

RadDataBoundListBox not updated after changes in data source

5 Answers 147 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Carl-Otto
Top achievements
Rank 1
Carl-Otto asked on 15 Aug 2014, 12:03 PM
Hi,

I have a RadDataBoundListBox bound to RadAutoCompleteBox which has a SuggestionsSource bound to a property in a ViewModel.
My problem is that when I update the source of the property in the ViewModel that derives from GalaSoft.MvvmLight.ViewModelBase (and I fire RaisePropertyChanged()) the RadDataBoundListBox  is not updated. 
What I need to do is manually set focus on the RadAutoCompleteBox and then it is updated. Note that the list of data in source proerty is a ObservableCollection that holds items that derives from Telerik.Windows.Controls.ViewModelBase (and i call OnPropertyChanged("InfoImageSource")).

InfoImageSource is the property that is not updated in the UI and is of type Uri. In my datatemplate for RadDataBoundListBox i bind my Image control to the following: Source="{Binding InfoImageSource}"

Do you have any suggestions on what/how to solve the problem?

Br

Carl-Otto

5 Answers, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 20 Aug 2014, 10:24 AM
Hello Carl-Otto,

Thank you for contacting us.

I have attached a sample project that demonstrates how to use the RadAutoCompleteBox with RadDataBoundListBox to display its suggested items. When the property of the view model, that the ItemsSource of the RadAutoCompleteBox is bound to, is changed, the items in the RadDataBoundListBox are cleared. Please, take a look at the attached project and let us know if this solves your problem.

I hope this helps.

Regards,
Rosy Topchiyska
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Carl-Otto
Top achievements
Rank 1
answered on 20 Aug 2014, 02:06 PM
Hi,

Tnx for your answere. However, if I add 

EmptyFilterBehavior="ShowAll"

To the AutoCompleteBox in your solution I get the same result, that I need to set focus to the autocompletebox to make the UI change.

Br

Carl-Otto
0
Rosy Topchiyska
Telerik team
answered on 22 Aug 2014, 09:29 AM
Hello Carl-Otto,

I am afraid do not quite understand what is your scenario, so I have attached a video (demo.rar, you can open the swf file in your browser) demonstrating three cases where the controls works as expected:
  1. The search text in AutoCompleteBox is empty when the source is changed - all new items are displayed by the DataBoundListBox;
  2. The searched text is contained in the old and the new source - the results are filtered when the source is changed;
  3. The searched text is contained only in the old source - no items are displayed in the DataBoundListBox;

In all cases the results are immediately updated in the DataBoundListBox. I have also attached the test application used to capture the video, although it is pretty much the same. Please let me know if I am missing something and if so, could you provide additional information about what steps are needed to reproduce the erroneous behavior.

I look forward to your reply.

Regards,
Rosy Topchiyska
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Carl-Otto
Top achievements
Rank 1
answered on 23 Aug 2014, 09:08 AM
Hi,

This is very strange. I see that it works in your video, however it does not work for me when I run your solution. I have only added my own telerik dll:s.

Telerik.Windows.Controls.Primitives - 2014.1.0226.3040
Telerik.Windows.Controls.Input - 2014.1.0226.3040
Telerik.Windows.Core - 2014.1.0226.3040

Br

Carl-Otto
0
Rosy Topchiyska
Telerik team
answered on 27 Aug 2014, 05:24 PM
Hi Carl,

This problem does not exist in the latest version of the controls (2014.2 0617). Unfortunately, your license has expired and you will have to renew it in order to update to the latest version.

Please, let me know if you need any assistance with purchasing a new license or renewing an expired one.

Regards,
Rosy Topchiyska
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Carl-Otto
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Carl-Otto
Top achievements
Rank 1
Carl-Otto
Top achievements
Rank 1
Share this question
or