Nov 28, 2008 at 11:19 AM
Edited Nov 28, 2008 at 11:20 AM
i encountered the following strange behaviour when using the DataGrid.
i bind a simple ObservableCollection<T> as the datagrid's itemsource where T is a simple class that contains a some properties.
I created a DataTemplate that is used as RowDetailsTemplate.
inside this datatemplate i have combobox that has its SelectedItem property bound to some property X of my object T and its ItemSource
set to another ObservableCollection<X> i get from my ViewModel.
However, if i click on some rows, so that its detailstemplate gets visible and try to change the selectedItem of the
combobox, all values of all other objects whose detailstemplate was visible before get changed with that.
I was able to workaround this issue when setting the ComboBox's ItemsSource Binding to Mode=OneTime although the datacontext
and the list provided by the viewmodel are definitely set only once.
Do the different items share the same bindings within detailstemplate?
btw. is there a planned bugfix for the combobox-inside-rowdetailstemplate-click-ignored bug?