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

Items not displayed properly when IsEditable = true

2 Answers 62 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ankit
Top achievements
Rank 1
Ankit asked on 06 Mar 2011, 06:22 PM
Hello,

This is my xaml code :-
<telerik:RadComboBox Margin="0,0,90,-1" Grid.Row="1" d:LayoutOverrides="Height"
                                ItemsSource="{Binding EventList}"
                                Text="{Binding Path=CurrentEvent.TitleOfEvent,Mode=TwoWay}" IsEditable="True"
                                TextSearchMode="Contains" DisplayMemberPath="{Binding SiteTermsXItemsName}"
                                SelectedValuePath="SiteTermsXItemsName"
                               >
               <telerik:RadComboBox.ItemTemplate>
                   <DataTemplate>
                       <TextBlock Text="{Binding SiteTermsXItemsName}"/>
                   </DataTemplate>
               </telerik:RadComboBox.ItemTemplate>
           </telerik:RadComboBox>

It works and i get a proper drop down because I have DataTemplate defined and so i can see value of column SiteTermsXItemsName. However, when i select a value from the dropdown i get the default toString() of the Entity instead of displaying SiteTermsXItemsName in the combobox. What am i missing?

Thanks in advance:)

2 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 07 Mar 2011, 06:06 PM
Hello Ankit,

You need to use the telerik:TextSearch.TextPath attached property to specify the member that will be displayed in the RadComboBox TextBox:
http://www.telerik.com/help/silverlight/radcombobox-features-autocomplete.html#using_textsearch_textpath

Greetings,
Valeri Hristov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Ankit
Top achievements
Rank 1
answered on 07 Mar 2011, 06:13 PM
Thanks Valeri Hristov , now it works smooth like butter.
Tags
ComboBox
Asked by
Ankit
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Ankit
Top achievements
Rank 1
Share this question
or