Associating string values to Items

3 posts, 0 answers
  1. Stephen
    Stephen avatar
    17 posts
    Member since:
    Aug 2013

    Posted 20 Sep 2013 Link to this post

    I have several ComboBox's that display items in a meaningful was to my users, but actually reflect something else. For example, the ComboBox might display car part descriptions, but for processing I need to know the actual part number that the part description was derived from. Is there anyway to associate the part number with the items being displayed in the ComboBox?
  2. Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 25 Sep 2013 Link to this post

    Hello Stephen,

    The best way to achieve this is to use collection of objects for ItemsSource of your RadComboBox. After that you can use DisplayMemberPath property to select which of the property of the object to be shown to the user. In this scenario the SelectedItem will be your object. You can also use SelectedValuePath property to indicate which of object's properties will be used as SelectedValue of the combo.

    I'm sending you a sample project demonstrating this approach. Please check it and inform us in case you have any problems or concerns.

    Rosen Vladimirov
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft R3 2016 release webinar banner
  4. Stephen
    Stephen avatar
    17 posts
    Member since:
    Aug 2013

    Posted 04 Oct 2013 Link to this post

    Thanks, all. We got it shortly after our original posting.
Back to Top