Lose scrollbar position after Ajax update

22 posts, 0 answers
  1. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 21 Feb 2008 Link to this post

    Hi, is there any issue that may let scrollbar position reset to the top after RadAjaxManager update a region?

    I try to dynamically load user controls in the Templated Columns, but after load it, the scrollbar's location always go to the top.

    Cheer for your help.
    Ricky.
  2. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 21 Feb 2008 Link to this post

    BTW: Even I use  RadAjaxMan.FocusControl(Reply_Btn.ClientID);, the focus stills scroll to the top.

    Ricky.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 22 Feb 2008 Link to this post

    Hi Ricky,

    For the scenario you have described, a better approach would be to use AjaxPanel in opposite to AjaxManager. By default RadAjaxPanel maintains the focus of ajaxified control when the response ends.
    For more information on manually controlling the scroll position, you could refer to the following online topic.

    Give this suggestion a try and let us know how it goes.

    Best wishes,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Kyle Parker
    Kyle Parker avatar
    42 posts
    Member since:
    Jan 2007

    Posted 30 Apr 2008 Link to this post

    I am also running into this problem where the ajax update positions the scroll bar at the topmost part of the page.  Here's my scenario:

    I am developing an application to allow students to apply for admission to the university.  On the page where they select a major, there is a dynamic user control that will display a supplemental application for particular majors, let's say "Music" in this example.  That "music" user control contains a checkbox list that has autopostback=true and a selectedindexchanged event that fires.  Depending on the selection, additional controls (contained within an ajax panel) may appear.

    When I click the checkbox, the loading panel image appears over the section, the new area is set to visible, but then the page scrolls back to the top.

    Here is a rough code snippet from the application:

    Section2.aspx

    <

    telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="alpLoading">

    <

    bsu:IntendedMajor runat="server" ID="bsuIntendedMajor1" StartTabIndex="8" Required="true" ItemCount="1" OnIntendedMajorSelectedIndexChanged="bsuIntendedMajor1_IntendedMajorSelectedIndexChanged" />

    </telerik:RadAjaxPanel>

    Intended Major user control (no ajax panels on this user control)

    - Loads the appropriate major user control, in this example "Music"

    Music user control (no ajax panels on this user control)

    <asp:Label runat="server" ID="lblMusicProgram" Text="Which music program(s) are you interested in (select all that apply)?" AssociatedControlID="cbxlMusicProgram"></asp:Label>

    <asp:CheckBoxList runat="server" ID="cbxlMusicProgram" AutoPostBack="true" OnSelectedIndexChanged="cbxlMusicProgram_SelectedIndexChanged"></asp:CheckBoxList>

    Code behind

    Based on selection:

    pnlMusicEducation.Visible = false;
    pnlMusicTechnology.Visible =
    false;

    I'm not sure if this is enough of an explanation or code to fully understand the problem, so if I need to open a support ticket or submit additional details, please let me know.

    Thank you,
    Kyle Parker

  6. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 05 May 2008 Link to this post

    Hi Kyle,

    Do you get the same problem replacing the RadAjaxPanel with ASP:UpdatePanel? I've just performed a quick search on the topic resulting in a couple of nice articles like this and this one.

    I hope this helps!

    Regards,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Ricky
    Ricky avatar
    247 posts
    Member since:
    Jun 2007

    Posted 05 May 2008 Link to this post

  8. Kyle Parker
    Kyle Parker avatar
    42 posts
    Member since:
    Jan 2007

    Posted 10 Jun 2008 Link to this post

    Good afternoon. 

    I have continued working through this issue and I believe I have more information as to when this problem occurs. 

    Here's a more detailed situation. 

    If I have a radio button list and it has AutoPostBack=true and an event handler that then shows/hides a panel, the scroll position is fine.  The problems come in when that panel I'm showing contains a RadEditor (prometheus version).  Any time I dynamically (through an event handler and an ajax panel) show a panel containing the editor, the scroll position jumps to the top of the page.

    Any thoughts as to why this is happening?  Again, this ONLY happens with the editor - all other controls or scenarios maintain the scroll position without the addition of any custom javascript.

    Thank you,
    Kyle Parker
  9. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 11 Jun 2008 Link to this post

    Hi Kyle Parker,

    Did you give those suggestions from the previous replies a try? Does that function properly with an MS UpdatePanel?

    If you need further assistance, it will be best if you can isolate the problem in a runnable sample, which we can test locally. If so, please send it through a formal support ticket and will quickly get back to you with resolution.

    Sincerely yours,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. Sunil
    Sunil avatar
    230 posts
    Member since:
    Jan 2004

    Posted 22 Jun 2008 Link to this post

    I think the page scrolling to top when using radeditor and rad ajax from prometius version (latest Q1 2008) is SURE BUG?

    I have the same problem. As long as the ajax update includes the radeditor control, the page just scrolls to top. But as soon as I exclude the radeditor from ajax update, the ajax update then mantains scroll position.

    I have put this problem in a support ticket, but frankly don't know how long it  will take Telerik to resolve. If you have a solution, can you please share it with me? Thanks.
    I have spent a lot of time trying to debug this problem, but I cannot do anything since it's a bug in my opinion.

    Sunil
  11. Kyle Parker
    Kyle Parker avatar
    42 posts
    Member since:
    Jan 2007

    Posted 23 Jun 2008 Link to this post

    Sunil,

    I would tend to agree that this is a bug.  I do not think the extra Javascript or work-arounds should be a requirement to use the editor in an AJAX panel when the other controls work just fine in that scenario.

    I will be posting an example later today of the problem, unless you can post one earlier Sunil.

    Kyle
  12. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 25 Jun 2008 Link to this post

    Hello,

    We will surely investigate the problem. Unfortunately our tests fail to reproduce the problem so far. Can you guys open a formal support ticket and send a sample replicating the isolated issues? Your assistance is highly appreciated, thank you!

    Please, also check if you get the problem after upgrade to the latest Service Pack 2 of RadControls for ASP.NET AJAX , the version labeled 2008.1.619.

    All the best,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  13. Kyle Parker
    Kyle Parker avatar
    42 posts
    Member since:
    Jan 2007

    Posted 25 Jun 2008 Link to this post

    I am working on generating a sample, so I'll be submitting a ticket soon...some other projects have slowed me down on this one!

    thanks,
    kyle
  14. Kyle Parker
    Kyle Parker avatar
    42 posts
    Member since:
    Jan 2007

    Posted 25 Jun 2008 Link to this post

    I have created a very simple project that outlines this functionality and will be submitting a ticket with the source code.  I am using the Q1 release of the controls (I have not yet upgraded 2008.1.619).
  15. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 25 Jun 2008 Link to this post

    Hello Kyle Parker,

    You can download the 2008.1.619 version hotfix and replace the dll/assembly reference in the respective project only. If you still get the problem, we will be expecting your support ticket. Thank you!

    Greetings,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  16. Kyle Parker
    Kyle Parker avatar
    42 posts
    Member since:
    Jan 2007

    Posted 25 Jun 2008 Link to this post

    Konstantin ,

    Upgrading to the most recent release did fix the AJAX problem with the editor and the scroll position, but it introduced a new problem.  The shading of the AJAX panel is not lined up properly any more.  I'll submit a ticket for this one.

    thanks,
    kyle
  17. Sunil
    Sunil avatar
    230 posts
    Member since:
    Jan 2004

    Posted 25 Jun 2008 Link to this post

    Konstantin ,

    One of your support professionals is looking at this exact problem on my machine through remote connection . My project is a Sitefinity project and its impossible to send that project.

    I haven't heard from her so I am guessing she is still trying to solve the problem I reported.

    Thanks
    Sunil
  18. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 26 Jun 2008 Link to this post

    Hello,

    Kyle,
    Thank you for submitting the ticket about the new problem. We will get back to you shortly. I'm glad the new version resolved the problem with the editor scrolling issue.

    Sunil,
    The RadEditor team investigate the problem you reported and we will get back to you as soon as possible.

    Regards,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  19. Kyle Parker
    Kyle Parker avatar
    42 posts
    Member since:
    Jan 2007

    Posted 27 Jun 2008 Link to this post

    One last update to this thread - the scroll position problem has been fixed using the new version in the following browsers:

    Firefox 2.0 on the Mac
    Firefox 2.0 on the PC
    IE 7 on the PC

    However, it still loses the scroll position with Safair 3.0.4 on the Mac.
  20. Kyle Parker
    Kyle Parker avatar
    42 posts
    Member since:
    Jan 2007

    Posted 27 Jun 2008 Link to this post

    Add the new version of Firefox to the list of browsers that still lose the scroll position.
  21. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 30 Jun 2008 Link to this post

    Hello Kyle,

    Thank you for your research on the matter and sharing your findings.

    Would you please submit a regular support ticket sending a sample page/application which replicates this and add your findings there as well. Your cooperation is much appreciated, thank you!

    Greetings,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  22. iomega 55
    iomega 55 avatar
    64 posts
    Member since:
    Dec 2004

    Posted 13 Sep 2009 Link to this post

    This is happening to me. I have my controls inside a RadAjaxpanel, but after a callback the scrollposition is lost. It returns always to the top.

    Any suggestion?
  23. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 14 Sep 2009 Link to this post

    Hello iomega 55,

    By default the scroll position should be retained if you scrollable container resides inside RadAjaxPanel (as my colleague Maria explained before).

    If you have some custom scenario, can you check whether the same behavior is present when you replace the RadAjaxPanel instance with standard MS UpdatePanel? If so, you may need to implement your own mechanism (with javascript) to save the scroll position. Sample approach is discussed in this ASP.NET forum thread:

    http://forums.asp.net/p/1262345/3399743.aspx#3399743

    Kind regards,

    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017