wizard scroll to top on next

3 posts, 0 answers
  1. Yan
    Yan avatar
    18 posts
    Member since:
    Oct 2010

    Posted 11 Nov 2016 Link to this post

    Hi,  One of my wizard step is taking up a lot of space on mobile.  User need to scroll down to fill the form.  When the user click next,  the wizard does not come back to top.

     

    Is there a way to automatically scoll back to top when we hit "next" ?

     

    thank you

  2. Yan
    Yan avatar
    18 posts
    Member since:
    Oct 2010

    Posted 11 Nov 2016 Link to this post

    by the way my wizard is in an ajax pannel if this change something!
  3. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1304 posts

    Posted 16 Nov 2016 Link to this post

    Hello Yan,

    Indeed this behavior is related to updating the Wizard with the AjaxPanel. You can scroll to the top of the page when the Wizard is loaded as shown below:
    <script>   
        function OnClientLoad(sender) {
            setTimeout(function () {
                $telerik.$(window).scrollTop(0);
            }, 100)
        }
    </script>
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
                <telerik:RadWizard ID="RadWizard1" runat="server" OnNextButtonClick="RadWizard1_NextButtonClick"
                     OnPreviousButtonClick="RadWizard1_PreviousButtonClick" OnClientLoad="OnClientLoad">


    Regards,
    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top