Error when using back button

20 posts, 0 answers
  1. genesplitter
    genesplitter avatar
    25 posts
    Member since:
    Nov 2006

    Posted 13 Mar 2008 Link to this post

    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
  2. Rosi
    Admin
    Rosi avatar
    2529 posts

    Posted 18 Mar 2008 Link to this post

    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
  3. genesplitter
    genesplitter avatar
    25 posts
    Member since:
    Nov 2006

    Posted 19 Mar 2008 Link to this post

    Your hotfix works - thanxs!
  4. ashish
    ashish avatar
    28 posts
    Member since:
    Jun 2012

    Posted 08 May 2008 Link to this post

    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?
  5. Nikolay
    Admin
    Nikolay avatar
    3997 posts

    Posted 08 May 2008 Link to this post

    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
  6. ashish
    ashish avatar
    28 posts
    Member since:
    Jun 2012

    Posted 09 May 2008 Link to this post

    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


  7. ashish
    ashish avatar
    28 posts
    Member since:
    Jun 2012

    Posted 09 May 2008 Link to this post

    As its a different version from the one in this thread I have opened a new  support ticket for this problem
  8. Nikolay
    Admin
    Nikolay avatar
    3997 posts

    Posted 09 May 2008 Link to this post

    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
  9. newbie
    newbie avatar
    355 posts
    Member since:
    Feb 2008

    Posted 26 Jun 2008 Link to this post

    did you find a solution to this .
    I am having a similar problem.
  10. Rosi
    Admin
    Rosi avatar
    2529 posts

    Posted 27 Jun 2008 Link to this post

    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
  11. prabhakar
    prabhakar avatar
    5 posts
    Member since:
    Dec 2008

    Posted 04 Jan 2011 Link to this post

    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

  12. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 04 Jan 2011 Link to this post

    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.
  13. Anil
    Anil avatar
    12 posts
    Member since:
    Dec 2010

    Posted 28 Mar 2011 Link to this post

    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.

     

  14. Abhishek
    Abhishek avatar
    21 posts
    Member since:
    Mar 2011

    Posted 28 Mar 2011 Link to this post

    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.

  15. Abhishek
    Abhishek avatar
    21 posts
    Member since:
    Mar 2011

    Posted 29 Mar 2011 Link to this post

    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?
  16. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 29 Mar 2011 Link to this post

    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
  17. Abhishek
    Abhishek avatar
    21 posts
    Member since:
    Mar 2011

    Posted 29 Mar 2011 Link to this post

    Hi,

    I have installed Telerik RadControls for ASP.NET AJAX Q3 2010 SP2.
    Its version is 2010.3.1317.40
  18. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 30 Mar 2011 Link to this post

    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
  19. Abhishek
    Abhishek avatar
    21 posts
    Member since:
    Mar 2011

    Posted 30 Mar 2011 Link to this post

    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>
  20. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 18 Apr 2011 Link to this post

    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.

Back to Top