16 Oct 2017 13:22
I have a RadGridView and bind its ItemsSource and its SelectedItem to properties of the ViewModel (DataContext). When the ViewModel is created, the property bound to ItemsSource is filled and the property bound to SelectedItem is set to one of the items in the collection.
However, when the GridView is displayed, the property is first set to null and then set to the first item in the collection. I assume that the binding of the SelectedItem is evaluated before the binding of the ItemsSource, so the grid is empty and the desired item can't be selected. Is there any way to influence the order, in which the binding are evaluated? Or is there any other way to avoid that the SelectedItem is changed?
A similar issue is described here: http://www.telerik.com/forums/selecteditem-binding-issue
Unfortunately, I couldn't to find the support ticket mentioned in this thread.