This is a migrated thread and some comments may be shown as answers.

Select value if only one

1 Answer 43 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Tomasz Wisniewski
Top achievements
Rank 1
Tomasz Wisniewski asked on 14 Oct 2010, 08:36 AM
Hi,

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?

1 Answer, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 15 Oct 2010, 10:38 AM
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: http://www.telerik.com/help/silverlight/radcombobox-features-selection.html

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

Sincerely yours,
Konstantina
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
Tags
ComboBox
Asked by
Tomasz Wisniewski
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or