RadCombobox Selection in GridViewComboBoxColumn

2 posts, 0 answers
  1. Levon
    Levon avatar
    17 posts
    Member since:
    May 2013

    Posted 25 Jul 2013 Link to this post

    Hi, 

    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?
  2. Yoan
    Admin
    Yoan avatar
    1159 posts

    Posted 30 Jul 2013 Link to this post

    Hi Levon,

    I would suggest you to check this help article where you can find information about how to properly define GridViewComboBoxColumn. Then you can check this troubleshooting article.

    I hope this helps.


    Regards,
    Yoan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top