ValuePath property?

3 posts, 1 answers
  1. Morgan
    Morgan avatar
    8 posts
    Member since:
    Jan 2009

    Posted 17 Mar 2011 Link to this post

    In other products, I had a ValuePath property and Value property, which allowed me to specify
    1. The property of the lookup collection to use for the identifier of the value on the data context (ValuePath)
    2. The value of the item in the data context, uh, (Value)

    I assume SelectedValue is the property for Value?

    Is there a ValuePath property? How do I specify that StateId from a State collection bound to the radcombo is the property to use for StateId on a Address object?

    Thanks,

    Morgan
  2. Answer
    Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 18 Mar 2011 Link to this post

    Hi Morgan,

    The property you need is SelectedValuePath. So for example if the DataContext is an object Order with property ClientID of type int. RadComboBox is bound to a collection of Client objects, the combo declaration should be something like this:

    <telerik:RadComboBox ItemsSource="{Binding AllClients}" SelectedValuePath="ClientID" DisplayMemberPath="FullName" SelectedValue="{Binding ClientID, Mode=TwoWay}" />

    Best wishes,
    Valeri Hristov
    the Telerik team
  3. UI for WPF is Visual Studio 2017 Ready
  4. Morgan
    Morgan avatar
    8 posts
    Member since:
    Jan 2009

    Posted 21 Mar 2011 Link to this post

    Wonderful. Thanks for the clarification.
Back to Top