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

Selection Out Of Range Exception

0 Answers 58 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Rick
Top achievements
Rank 1
Rick asked on 15 Jan 2009, 11:02 AM
Hi,

When I try and set the SelectedValue by using Bind in the .aspx page, if the value isn't found in the list it (quite rightly) throws an exception. See example below:

<telerik:RadComboBox ID="rcbSalesPersons" DataSourceID="odsSalesPerson" runat="server"  
  Filter="Contains" DataTextField="Description" DataValueField="ValueID" 
  SelectedValue='<%# Bind("SalesPersonID") %>'  EmptyMessage="Select a Sales Person...">                                                                                                                                                                                                         
</telerik:RadComboBox>                                
 

Is there any way to suppress this exception if I don't care that the value isn't in the list? I know I can do it in the code behind, I just want to know what my options are.


No answers yet. Maybe you can help?

Tags
ComboBox
Asked by
Rick
Top achievements
Rank 1
Share this question
or