Completed
Last Updated: 02 Nov 2020 11:48 by ADMIN
Release R3 2020 SP1
Dinko
Created on: 13 Oct 2020 08:36
Category: ListBox
Type: Bug Report
0
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.

MyCollectionViewSource.View.MoveCurrentToPosition(-1);

0 comments