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

Databind problem with SelectedValue not in item list

1 Answer 32 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jorge
Top achievements
Rank 1
Jorge asked on 09 Jul 2010, 05:55 PM
I have a databound RadComboBox (with databound item list). If the SelectedValue is not in the item list I get a "Selection out of Range" exception.
Is there any way to prevent this and just set SelectedValue to null?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 12 Jul 2010, 02:47 PM
Hello Jorge,

You can avoid this if you call ClearSelection() before you bind the RadComboBox.

Sincerely yours,
Simon
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
Jorge
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or