
This page is one of many in a multistep wizard and each page has previous / next buttons. The problem occurs if the user goes back one step to the multiple combobox page and then changes the comboboxs. They get the following error on the second combobox:
System.ArgumentOutOfRangeException was unhandled by user code
Message="Selection out of range\r\nParameter name: value"
Source="Telerik.Web.UI"
ParamName="value"
Since I copied your example code, I tested your example to see if your page would also throw an error if I used the back button and then changed the combobox selections. I did get an error.
Here are the steps to reproduce the error:
1) Go to http://www.telerik.com/DEMOS/ASPNET/Prometheus/Combobox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx
2) Select a continent, then country, and then city
3) Click on Telerik Home (to simulate clicking a next button like my multistep wizard)
4) Use your browser history to go back (my application has a previous button with onclick=history.back)
5) Selecting a continent will throw an error (I assume on country DataBind)
Regards,
http://www.donaldlee.net
19 Answers, 1 is accepted
Thanks for bringing this to our attention.
This is fixed in our latest internal build attached to this message. Download it and try it.
Regards,
Rosi
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center


System.ArgumentOutOfRangeException was unhandled by user code
Message="Selection out of range\r\nParameter name: value"
Source="Telerik.Web.UI"
ParamName="value"
On Debuging, the error comes while the 2nd combo box is databinding.
If I do not update asynchronously, and let the last box post back, everything is all right, but as soon as I try updating an ajax panel I get this error.
Any ideas?
Did you try the provided hotfix? Did the problem appear with it?
Sincerely yours,
Nick
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center


Thanks for opening a support ticket. We will proceed there.
All the best,
Nick
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

I am having a similar problem.
Hello ,
I suggest you try our latest official release 2008.1.619. and let us known how this goes.
If the problem still persists, please send us a live url or open a support ticket and send us a sample project to test it locally.
Regards,
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

Happy new year!
This is to inform you guys that,we have just upgraded one of my project to Telerik 2010.3 library and i believe it has same 'value' exception problem mentioned in above thread.
you guys may want to make a hotfix again for the release 2010.3 build, as like you did for 2007 build.
I confirm that this exception was not existed in release 2010.2.Exception started only after code get to 2010.3 release.
I know the solution is 'Combobox1.ClearSelection()' or 'Combobox.SelectedValue =null;'
but the question is why this release has this problem why not this is not in last year or previous releases?
Thanks
Prabhakar
What exactly is the setup in which did you started to see the exception after upgrading to the latest version?
Best wishes,
Simon
the Telerik team

My issue is also similar.
I have created a wizard using aspx pages. on first page i have a combobox and next button. I select item from combobox and click on next button. As a result request is redirected to 2nd page. Then click on the previous button. Previous button has code
"window.history.back(-1);" OnClientClicked event. So request is redirected to 1st page. And it shows the selected value in combobox. but when i access the combobox selectedvalue it shows value at 0 index not the selected one.
Please suggest solution.

Hi,
My issue is also similar. I am using the licenced version.
I have created a wizard using aspx pages. on first page i have a combobox and next button. I select item from combobox and click on next button. As a result request is redirected to 2nd page. Then click on the previous button. Previous button has code
"window.history.back(-1);" OnClientClicked event. So request is redirected to 1st page. And it shows the selected value in combobox. but when i access the combobox selectedvalue it shows value at 0 index not the selected one.
Please suggest solution.

I downloaded the hotfix "079661_Telerik.Web.UI_2007_3_1517_trial_hotfix".
On opening this hotfix i get a message that my machine have updated version of radcontrol than this and asked to upgrade.
So what should i do?
What is the version you had prior to installing Telerik.Web.UI_2007_3_1517_trial_hotfix?
Kind regards,Simon
the Telerik team

I have installed Telerik RadControls for ASP.NET AJAX Q3 2010 SP2.
Its version is 2010.3.1317.40
Thank you for the clarification.
You are actually trying to downgrade to a very old version of Telerik.Web.UI. We do not recommend doing this at all as it will potentially break your entire application.
Please instead see this help article describing how to resolve the initial problem with the Back browser button.
Best wishes,
Simon
the Telerik team

Thanks for the reply. it will work if there is predetermined number of combobox on page.
But in my case i have combobox inside radgrid. so how can i apply the suggested logic on following code.
<
telerik:RadGrid
ID
=
"dViewQuestionnaireNamesGrid"
runat
=
"server"
AutoGenerateColumns
=
"False"
Width
=
"99.5%"
GridLines
=
"none"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"QuestionName"
UniqueName
=
"QuestionName"
ReadOnly
=
"True"
HeaderText
=
"Attributes"
HeaderStyle-CssClass
=
"background_dbf7ff headertext"
HeaderStyle-ForeColor
=
"#00759B"
HeaderStyle-Font-Bold
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Scoring Logic Type"
HeaderStyle-CssClass
=
"background_dbf7ff headertext"
HeaderStyle-ForeColor
=
"#00759B"
HeaderStyle-Font-Bold
=
"true"
>
<
ItemTemplate
>
<
telerik:RadComboBox
CssClass
=
"singlelineLBox"
ID
=
"drpDownScoringLogicTypes"
runat
=
"server"
>
</
telerik:RadComboBox
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
In order to apply the same logic the code needs to be adapted to the case of multiple ComboBoxes on the page.
The easiest way to achieve the same result is to add the hidden field inside the Template and set its ID to that of the ComboBox with the "Value" suffix. Then you can use the Load event of the RadComboBox instead of the global pageLoad function. The event fires for each RCB on the page and the first parameter holds a reference to the respective RCB, so you do not need to use its ID explicitly. Then finding the respective hidden field is a matter of appending "Value" to the ID of the RCB. Below is the modified code:
<
telerik:RadGrid
ID
=
"dViewQuestionnaireNamesGrid"
runat
=
"server"
AutoGenerateColumns
=
"False"
Width
=
"99.5%"
GridLines
=
"none"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"QuestionName"
UniqueName
=
"QuestionName"
ReadOnly
=
"True"
HeaderText
=
"Attributes"
HeaderStyle-CssClass
=
"background_dbf7ff headertext"
HeaderStyle-ForeColor
=
"#00759B"
HeaderStyle-Font-Bold
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Scoring Logic Type"
HeaderStyle-CssClass
=
"background_dbf7ff headertext"
HeaderStyle-ForeColor
=
"#00759B"
HeaderStyle-Font-Bold
=
"true"
>
<
ItemTemplate
>
<
telerik:RadComboBox
CssClass
=
"singlelineLBox"
ID
=
"drpDownScoringLogicTypes"
runat
=
"server"
OnClientLoad
=
"onLoad"
OnClientSelectedIndexChanged
=
"onSelectedIndexChanged"
>
</
telerik:RadComboBox
>
<
asp:HiddenField
ID
=
"drpDownScoringLogicTypesValue"
runat
=
"server"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
script
type
=
"text/javascript"
>
function onLoad(sender) {
var savedValue = $get(sender.get_id() + "Value").value;
if (savedValue != "" && sender.findItemByValue(savedValue))
sender.findItemByValue(savedValue).select();
}
function onSelectedIndexChanged(sender, eventArgs) {
$get(sender.get_id() + "Value").value = eventArgs.get_item().get_value();
}
</
script
>
I hope this helps.
Best wishes,
Simon
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.