In Development
Last Updated: 13 Oct 2020 16:38 by ADMIN
Created on: 13 Oct 2020 08:36
Category: ListBox
Type: Bug Report
ListBox: When placed inside DataTemplate and bind to CollectionViewSource.View the SelectedItem binding fails

In this particular scenario, the RadListBox is placed inside DataTemplate and its ItemsSource property is bound to CollectionViewSource.View. Now when we try to bind the SelectedItem property, the binding fails. The reason behind this is that when the RadListBox is loading, the CurrentItem of the CollectionViewSource is set to the SelectedItem property after the binding kicks in. Which will break the binding. To workaround this we can set the CurrentItem to Null.