SelectedValue with SelectedValuePath not working!

2 posts, 0 answers
  1. Valentijn
    Valentijn avatar
    21 posts
    Member since:
    Sep 2010

    Posted 26 Oct 2010 Link to this post


    I try to set the selectedvalue of a combobox as specified in your examples but nothing happens.




    <telerik:RadComboBox x:Name="cmbProvince" Grid.Row="2" Height="23" Width="184" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.ColumnSpan="2" ItemsSource="{Binding Path=Data, Source={StaticResource provinceDomainDataSource}}" SelectedValuePath="ProvinceId">















    <TextBlock Text="{Binding GlobalizedDescription, Converter={StaticResource localizeConverter}}" />

















    In code:



    this.cmbProvince.SelectedValue = ((Bass.Web.DataModel.PostalCode)postalCode).ProvinceId;

    Debugging past this line still reveals SelectedValue to be null. It does not get updated. Can this have something to do with the itemtemplate that is in my combo?

    Best regards and thanks for your help.


  2. Yana
    Yana avatar
    4547 posts

    Posted 29 Oct 2010 Link to this post

    Hello Valentijn,

    I've attached a simple project based on your code to demonstrate that setting SelectedValue works without a problem. Please check again the used converter in the combobox template.

    All the best, Yana
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top