Hi,
I have a GridViewComboBoxColumn in my Grid, and an ObservableCollection is bound to it.
When I click the last item of the combobox a popup is opened, so that I could enter a new GroupName(here is the picture). The GroupName is added to the Groups ObservableCollection, and the popup closes(MVVM Light messaging is used).
When the popup closes the new GroupName is added to the collection, but it is not displayed in the combobox. the combo becomes empty(here is the picture) .
How can I solve this problem?
I have a GridViewComboBoxColumn in my Grid, and an ObservableCollection is bound to it.
<
telerik:GridViewComboBoxColumn
DataMemberBinding
=
"{Binding GroupName, Mode=TwoWay}"
ItemsSource
=
"{Binding Groups}"
Header
=
"Group"
IsFilterable
=
"False"
Width
=
"150"
>
When I click the last item of the combobox a popup is opened, so that I could enter a new GroupName(here is the picture). The GroupName is added to the Groups ObservableCollection, and the popup closes(MVVM Light messaging is used).
private void ComboSelectionChanged(object sender, RadRoutedEventArgs args)
{
var comboBox = args.OriginalSource as RadComboBox;
if (comboBox == null || comboBox.Text != "New...")
return;
this.Grid.ActionOnLostFocus = ActionOnLostFocus.None;
ChildWindow wnd = new GroupCreationPopup();
wnd.DataContext = this.DataContext;
wnd.Show();
}
When the popup closes the new GroupName is added to the collection, but it is not displayed in the combobox. the combo becomes empty(here is the picture) .
How can I solve this problem?