Hi
I have a RadComboBox bound to an ObservableCollection<ColumnGroupViewModel> It looks like this:
Groups is the ObservableCollection and SelectedGroup is a property returning the current ColumnGroupViewModel. ColumnGroupViewModel.GroupName is the string I want to be displayed in the dropdown and also in the editable area. However when my app runs it only displays the class name for ColumnGroupViewModel in the editable area. However all the proper GroupNames are displayed in the dropdown portion of the combobox.
I tried using SelectionBoxItemTemplate for the editable area but that just left the editable area blank. I don't see how to use a DataTemplate inside of an EditableTemplate so I'm lost here.
Any suggestions?
If I do get this working then my next question would be what does the RadComboBox do when the user types in a string value that doesn't match a GroupName in the ObservableCollection? Preferably I would like to catch this before an error and create a new ColumnGroupViewModel to add in the ObservableCollection with the newly specified value from the editable portion of the combobox.
Thanks, Derek
I have a RadComboBox bound to an ObservableCollection<ColumnGroupViewModel> It looks like this:
<telerikInput:RadComboBox x:Name="cbxGroup" Margin="0,0,0,3" VerticalAlignment="Center" |
d:LayoutOverrides="Height" Width="195" |
IsEnabled="{Binding Locked}" |
ItemsSource="{Binding Groups, Mode=TwoWay}" |
SelectedItem="{Binding SelectedGroup, Mode=TwoWay}" |
LostFocus="cbxGroup_OnLostFocus" |
Visibility="{Binding ColumnVisibility}" IsEditable="True"> |
<telerikInput:RadComboBox.ItemTemplate> |
<DataTemplate> |
<TextBlock Text="{Binding GroupName}"/> |
</DataTemplate> |
</telerikInput:RadComboBox.ItemTemplate> |
</telerikInput:RadComboBox> |
I tried using SelectionBoxItemTemplate for the editable area but that just left the editable area blank. I don't see how to use a DataTemplate inside of an EditableTemplate so I'm lost here.
Any suggestions?
If I do get this working then my next question would be what does the RadComboBox do when the user types in a string value that doesn't match a GroupName in the ObservableCollection? Preferably I would like to catch this before an error and create a new ColumnGroupViewModel to add in the ObservableCollection with the newly specified value from the editable portion of the combobox.
Thanks, Derek