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

SelectionBox with ItemTemplate and IsEditable

1 Answer 65 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Andreas asked on 27 May 2011, 10:51 AM

We have the following problem:
We want to have an editable combobox which shows items with an ItemTemplate. But when we use the TextSearch.TextPath Property only the choosen path will be displayed in the selection box. But we want to display the items as defined in the itemtemplate with further support of searching with isEditable=true.

Thanks for your help.

        <DataTemplate x:Key="CustomItemTemplate">
            <StackPanel Margin="0 3" Orientation="Horizontal">
                <TextBlock Text="{Binding Surname}" />
                <TextBlock Text="{Binding Firstname}" Margin="4,0,0,0" />
<telerikInput:RadComboBox Grid.Column="1"
                                                          ItemsSource="{Binding Path=EmpColl}"
                                                          SelectedItem="{Binding Path=Head, Mode=TwoWay, ValidatesOnNotifyDataErrors=True}"
                                                          ItemTemplate="{StaticResource CustomItemTemplate}"

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 30 May 2011, 07:55 AM
Hi Andreas,

By default the template of the selected item in RadComboBox indeed is the path of the binding only. If you want to apply different data formatting , you are probably fimiliar with the fact that this is done via the SelectionBoxTemplate. However, the SelectionBoxTemplate is applicable only when the RadComboBox is IsEditable="False". And it is not possible to change the visualization of the selected item when IsEditable="True".
In fact, this is an intended and quite normal behavior. Imagine you have a few other controls in your selection template and when you put your cursor in the editable combo, you are practically editing a few controls.

I would suggest that you try to find a different approach that fits your control editing scenario. I hope this helps.

Best wishes,
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question