This is a migrated thread and some comments may be shown as answers.

RadCombobox Selection in GridViewComboBoxColumn

1 Answer 59 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Levon
Top achievements
Rank 1
Levon asked on 25 Jul 2013, 08:04 AM
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?

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 30 Jul 2013, 08:34 AM
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 >>
Tags
GridView
Asked by
Levon
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or