This question is locked. New answers and comments are not allowed.
I think I found a bug when I try to repopulate a RadTabControl and I have a radcombobox whose ItemsSource is binding.
First off I set
myTabControl.DataContext = myBigClassOfStuff; //This class has many objects including a list for the ItemsSource of the radcombobox
Say I click a button and when I get my new result of myBigClassOfStuff, I again call:
myTabControl.DataContext = myBigClassOfStuff;
For all textboxes and radcomboboxes that don't have their ItemsSource binding (but ItemsSource set programatically in the code), everything is fine. The radComboxes that do have their itemsource filled, but the selected item isn't selected. Also the value of
myBigClassOfStuff.selectedValue will become null if myTabControl.DataContext already has a value.
If I do this:
myTabControl.DataContext = null;
myTabControl.DataContext = myBigClassOfStuff;
Then everything is almost ok and myBigClassOfStuff.selectedValue will keep it's original value. This would be fine, but there is one more strange thing the tab control does. When I do that and I'm on a different tab than the radcombobox I'm interested in, the selected value won't show up when I go to that tab. When I'm on that tab and get my new myBigClassOfStuff everything is fine though.
When I programatically populate the dropdown boxes everything is ok. Maybe I'll just do that. Any suggestions, or things I'm doing wrong?
myBigClassOfStuff.AllContacts - is a list of a class
myBigClassOfStuff.AttentionId - is the selected value of the RadComboBox
<telerik:RadComboBox ItemsSource="{Binding AllContacts}" SelectedValue="{Binding AttentionId}" ...
First off I set
myTabControl.DataContext = myBigClassOfStuff; //This class has many objects including a list for the ItemsSource of the radcombobox
Say I click a button and when I get my new result of myBigClassOfStuff, I again call:
myTabControl.DataContext = myBigClassOfStuff;
For all textboxes and radcomboboxes that don't have their ItemsSource binding (but ItemsSource set programatically in the code), everything is fine. The radComboxes that do have their itemsource filled, but the selected item isn't selected. Also the value of
myBigClassOfStuff.selectedValue will become null if myTabControl.DataContext already has a value.
If I do this:
myTabControl.DataContext = null;
myTabControl.DataContext = myBigClassOfStuff;
Then everything is almost ok and myBigClassOfStuff.selectedValue will keep it's original value. This would be fine, but there is one more strange thing the tab control does. When I do that and I'm on a different tab than the radcombobox I'm interested in, the selected value won't show up when I go to that tab. When I'm on that tab and get my new myBigClassOfStuff everything is fine though.
When I programatically populate the dropdown boxes everything is ok. Maybe I'll just do that. Any suggestions, or things I'm doing wrong?
myBigClassOfStuff.AllContacts - is a list of a class
myBigClassOfStuff.AttentionId - is the selected value of the RadComboBox
<telerik:RadComboBox ItemsSource="{Binding AllContacts}" SelectedValue="{Binding AttentionId}" ...