RadDataBoundListBox not updated after changes in data source

6 posts, 0 answers
  1. Carl-Otto
    Carl-Otto avatar
    2 posts
    Member since:
    May 2013

    Posted 15 Aug 2014 Link to this post

    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
  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 20 Aug 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. Carl-Otto
    Carl-Otto avatar
    1 posts
    Member since:
    Mar 2011

    Posted 20 Aug 2014 in reply to Rosy Topchiyska Link to this post

    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
  5. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 22 Aug 2014 Link to this post

    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.

     
  6. Carl-Otto
    Carl-Otto avatar
    2 posts
    Member since:
    May 2013

    Posted 23 Aug 2014 in reply to Rosy Topchiyska Link to this post

    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
  7. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 27 Aug 2014 Link to this post

    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.

     
Back to Top
DevCraft banner