This issue that is occurring is that whenever the WPF ComboBox
ItemsSource property is changed the SelectedItem property is being set to null.
Requirements to recreate issue:
- Original ItemsSource is a collection of objects that ARE NOT value types
- SelectedValue is bound to some property
- SelectedValuePath is set
- SelectedItem is some item in the original ItemsSource
- New ItemsSource is a collection of objects of the same type as the original
- ItemsSource that does not contain a reference to the same object in memory as the current SelectedItem
Actually I want to bind Combobox in Datagrid templete, Combobox collection exist in view model, When I change first column property other rows combo box item became null.
How can i solve this issue?