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

How to make a RadComboBox in a Grid not limit to list

1 Answer 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 12 Oct 2011, 04:19 AM
Hi,

I have a simple request. I want to allow my combo's to accept values even if the item is not in the list.
Remember MS Access when you could enter values into a combo that was not LIMIT TO LIST.

I've got a RadComboBox in a RadGridView as follows...

<telerik:RadGridView.Columns>
  <telerik:GridViewDataColumn.CellEditTemplate>
       <DataTemplate>
            <telerik:RadComboBox
                    IsReadOnly="False"
                     IsEditable="True"
                     ItemsSource="{Binding Path=Client.Contact}"
                     SelectionChanged="AssignedToNameCombo_SelectionChanged"
                 TextSearchMode="Contains"
                      SelectedValue="{Binding Name, Mode=TwoWay}"
                      SelectedValuePath="name_display"
                      DisplayMemberPath="name_display"/>  
       </DataTemplate>
  </telerik:GridViewDataColumn.CellEditTemplate>
</telerik:RadGridView.Columns>
 
  Things are all bound correctly and work fine against my ViewModel using Prism, (as an aside, the gird editng does not work as nicely as it does if just bound to normal CLR objects).

However what i want to do is allow the user to enter some text into the editable combo and if it's not in the ItemsSource list, then just accept it and post it to the DataContext. ie this is NOT a limit to list combo.

Can this be one. The field I am populating is a simple string and not bound by unique Id's or ForeignKeys.

An example would be great.
Thanks!

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 12 Oct 2011, 09:00 AM
Hi Simon,

Please take a look at this forum thread for a reference and a sample project illustrating how you could achieve such functionality.
 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Simon
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or