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

Error when using back button

19 Answers 216 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
genesplitter
Top achievements
Rank 2
genesplitter asked on 13 Mar 2008, 11:01 PM
I have a page with three rad comboboxes showing State, City, and PostalCode. It is basically a copy of your multiple combobox example.

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

Sort by
0
Rosi
Telerik team
answered on 18 Mar 2008, 05:53 PM
Hi Donald Lee,

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
0
genesplitter
Top achievements
Rank 2
answered on 19 Mar 2008, 10:27 PM
Your hotfix works - thanxs!
0
ashish
Top achievements
Rank 1
answered on 08 May 2008, 06:50 AM
I am using this thread as my problem is very similar to the one described. I am using Q1 Prometheus Combobox . Say I use the multiple combobox example, and make the last box autopostback = true , and update a ajaxmanager panel with the selected item. Now when I go back to the first combo box, I get the  error  -

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?
0
Nikolay
Telerik team
answered on 08 May 2008, 07:02 AM
Hello ashish,

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
0
ashish
Top achievements
Rank 1
answered on 09 May 2008, 05:37 AM
No I did not try the hot fix, as I am on Q1 2008 asp.net ajax, and this issue is from Q3 2007 version. So I assumed that the hot fix would have been incorporated in the release. If not, please provide a hot fix for the version I have. Also, I am not sure of the process for installing a hotfix, so please guide me in that too


0
ashish
Top achievements
Rank 1
answered on 09 May 2008, 06:40 AM
As its a different version from the one in this thread I have opened a new  support ticket for this problem
0
Nikolay
Telerik team
answered on 09 May 2008, 12:27 PM
Hello ashish,

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
0
newbie
Top achievements
Rank 1
answered on 26 Jun 2008, 07:29 PM
did you find a solution to this .
I am having a similar problem.
0
Rosi
Telerik team
answered on 27 Jun 2008, 07:19 AM

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,

Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
prabhakar
Top achievements
Rank 1
answered on 04 Jan 2011, 09:55 AM
Hi telerik team,
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

0
Simon
Telerik team
answered on 04 Jan 2011, 10:35 AM
Hello Antony Sequeira,

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
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.
0
Anil
Top achievements
Rank 1
answered on 28 Mar 2011, 01:01 PM
Hi,
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.

 

0
Abhishek
Top achievements
Rank 1
answered on 28 Mar 2011, 01:08 PM

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.

0
Abhishek
Top achievements
Rank 1
answered on 29 Mar 2011, 08:12 AM
Hi,
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?
0
Simon
Telerik team
answered on 29 Mar 2011, 04:08 PM
Hello Abhishek,

 What is the version you had prior to installing Telerik.Web.UI_2007_3_1517_trial_hotfix?

Kind regards,
Simon
the Telerik team
0
Abhishek
Top achievements
Rank 1
answered on 30 Mar 2011, 04:57 AM
Hi,

I have installed Telerik RadControls for ASP.NET AJAX Q3 2010 SP2.
Its version is 2010.3.1317.40
0
Simon
Telerik team
answered on 30 Mar 2011, 07:20 AM
Hello Abhishek,

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
0
Abhishek
Top achievements
Rank 1
answered on 30 Mar 2011, 01:03 PM
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>
0
Simon
Telerik team
answered on 18 Apr 2011, 04:15 PM
Hi Abhishek,

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.

Tags
ComboBox
Asked by
genesplitter
Top achievements
Rank 2
Answers by
Rosi
Telerik team
genesplitter
Top achievements
Rank 2
ashish
Top achievements
Rank 1
Nikolay
Telerik team
newbie
Top achievements
Rank 1
prabhakar
Top achievements
Rank 1
Simon
Telerik team
Anil
Top achievements
Rank 1
Abhishek
Top achievements
Rank 1
Share this question
or