ComboBox selecteditem text changes to a namespace

2 posts, 0 answers
  1. Colin
    Colin avatar
    1 posts
    Member since:
    Aug 2010

    Posted 04 Oct 2011 Link to this post

    Hi guys,

    This issue has probably been seen before, but I was unsuccessful at searching for a solution.

    I am working with a ComboBox bound to an ObservableCollection.  I am not having issues when the ComboBox is set to IsEditable=false.  When false, all members are displayed properly, including the selecteditem.

    When IsEditable=true, upon selection of the combobox, the text (for the editing text) changes to the namespace of the initial selectedvalue's object rather than the string value of the object's name property.  The object's name property is still properly displayed on the other items in the combobox.  If I replace the text, it searches through the other items just fine. When an item in the combobox is selected, it binds back to the selectedvalue just fine.  Upon reselecting the combobox, the same thing happens again.

    <telerik:RadComboBox x:Name="RadComboBox4"
    IsTextSearchEnabled="True" IsEditable="True" VerticalAlignment="Center"
    DataContext="{StaticResource DataContextProxy}" ItemsSource="{Binding DataSource.MyObjects}"
    SelectedValue="{Binding DataSource.CurrentCachedObject.MyObjectsSubObject, Mode=TwoWay}"
    DisplayMemberPath="Name" StaysOpenOnEdit="True" IsFilteringEnabled="True" TextSearchMode="Contains" OpenDropDownOnFocus="True" CanAutocompleteSelectItems="True" CanKeyboardNavigationSelectItems="True"
    telerik:TextSearch.TextPath="Name" />

    I might add that this is being used in a CellEditTemplate inside of a RadGridView.

    Please help!

  2. Yana
    Yana avatar
    5043 posts

    Posted 07 Oct 2011 Link to this post

    Hello Colin,

    I guess that you need to set SelectedValuePath property of the ComboBox.

    Please try it and if it doesn't help, send us additional details about your scenario which will help us reproduce the problem. Thanks

    the Telerik team

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

Back to Top