Scroll client-side to previous scroll location

4 posts, 1 answers
  1. jasper
    jasper avatar
    6 posts
    Member since:
    Oct 2012

    Posted 13 Jul Link to this post

    We use the RadTileList on a RadTab panel as first tab item. When I click on a Tile a new tab is opened.

    On leaving the RadTileList tab I would like to save the vertical scroll position and restore it when the RadTileList tab is visited again.

    Any ideas how to accomplish this? I did not found any client-side methods for it.

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 13 Jul Link to this post

    Hi Jasper,

    You are right that there is no public API created for this purpose.

    What I can suggest is that you use the dev toolbar of the browser to find the element that is scrolled, store its scrollTop and scrollLeft properties and restore them as needed. Depending on your setup, I suppose the OnClientTabSelecting and OnClientTabSelected events will be of use to store and restore the scroll position respectively.

    Regards,

    Marin Bratanov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. jasper
    jasper avatar
    6 posts
    Member since:
    Oct 2012

    Posted 14 Jul in reply to Marin Bratanov Link to this post

    Hi Marin,

    We would like to use it in combination with "Accelerated" scrolling.

  5. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 14 Jul Link to this post

    Hello,

    The Accelerated scrolling uses the so-called TouchScrollExtender widget from our code. As the article states, it is recommended for use only on mobile devices, and nowadays scrolling there works great, so I would advise that you do not use this mode, because it does not offer any advantages over the built-in touch devices' capabilities. It was created ages ago when this was not the case.

    That being said, what it does is modify the scrollTop and scrollLeft properties of the DOM element, so there shouldn't be a significant difference.

    Regards,

    Marin Bratanov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top