Items not displayed properly when IsEditable = true

3 posts, 0 answers
  1. Ankit
    Ankit avatar
    9 posts
    Member since:
    Jan 2011

    Posted 06 Mar 2011 Link to this post

    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. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 07 Mar 2011 Link to this post

    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!
  3. DevCraft banner
  4. Ankit
    Ankit avatar
    9 posts
    Member since:
    Jan 2011

    Posted 07 Mar 2011 Link to this post

    Thanks Valeri Hristov , now it works smooth like butter.
Back to Top