Losing page scroll position

3 posts, 1 answers
  1. Kevin Cauchi
    Kevin Cauchi avatar
    38 posts
    Member since:
    Dec 2009

    Posted 28 Nov 2011 Link to this post

    Hi there, 

    I have an ascx control where I have a timer, a few textboxes and a datagrid in an AJAX panel.

    Every 10 seconds, the timer calls a module that builds an SQL query depending on the textboxes given, then fetches the data and binds it to the grid.

    My problem is that sometimes it loses its scroll position. It does not necessarily scroll to the top, sometimes it even scrolls to the bottom or middle of the page (This means it is not doing a full page refresh... which is good).

    My suspicion is that it scrolls to the control that is focused on.

    Anyway to stop this?

    Thanks!

    K
  2. Answer
    Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 30 Nov 2011 Link to this post

    Hi Kevin,

    After the ajax request, the sroll position is reset to the position it had before the request started. So if the user scrolls, during the ajax request, it is expected to observe the described behavior.
    See how this can be overcome in the attached demo.

    Regards,
    Iana Tsolova
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. Kevin Cauchi
    Kevin Cauchi avatar
    38 posts
    Member since:
    Dec 2009

    Posted 30 Nov 2011 Link to this post

    PERFECT! Thanks!
Back to Top