Select value if only one

2 posts, 0 answers
  1. Tomasz Wisniewski
    Tomasz Wisniewski avatar
    14 posts
    Member since:
    Jan 2010

    Posted 14 Oct 2010 Link to this post


    I'm using a RadCombobox which items source is bind to a collection in ViewModel or to a static resource i View.
    I would like to have the ComboBox select a value if the itemsource has only one value so the user doesn't have to click on it.

    How can I achieve this?
  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 15 Oct 2010 Link to this post

    Hello Tomasz,

    Thank you for your question.

    After you check that the ItemsSource contains only 1 item, you could set the SelectedIndex or SelectedItem property of the ComboBox to that item. For more information you can refer to this help article:

    Hope this information helps. If you have any other questions please let us know.

    Sincerely yours,
    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
Back to Top