This is a migrated thread and some comments may be shown as answers.

scroll position

3 Answers 86 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
MBEN
Top achievements
Rank 2
Veteran
MBEN asked on 08 Oct 2020, 04:26 AM

In my rad wizard some steps have longer content. On Next click, the page maintains the scroll position instead of showing the top of the next step.

Is there a way I can get rid of the scroll position for the wizard?

3 Answers, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 12 Oct 2020, 12:21 PM

Hi,

RadWizard does not have a functionality to maintain scroll position. It is rather handled by the Page (Page.MaintainScrollPositionOnPostBack Property) or could be a JavaScript function. I would be able to tell you more if you could share the complete ASPX page.

Regards,
Attila Antal
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
MBEN
Top achievements
Rank 2
Veteran
answered on 13 Oct 2020, 05:23 AM

I haveMaintainScrollPositionOnPostBack set to true in the web.config for other pages. But I want to disable it when I am inside of the wizard. Using the Page directive doesn't work. I tried using the javascript function as in the link https://www.telerik.com/forums/wizard-scroll-to-top-on-next

but one of my wizard steps has a grid with add/edit buttons and the page scrolls to top with those as well. How Can I have the page scroll to top only with the next/previous buttons?

 

0
Attila Antal
Telerik team
answered on 15 Oct 2020, 08:53 AM

Hi,

If nothing maintains the scroll position, the Pages should always stay at the top and there is no need to implement additional logic. If this is set in the web.config then it will apply to all pages, but disabling it in the Page directive will disable it for that page respectively.

However, you have mentioned that you're using RadGrid. It is possible that the Grid has the SaveScrollPosition enabled and that is maintaining the scroll position. If that is the case the page with RadGrid will scroll down to the ScrollPosition it was left previously. 

You will need to decide whether you want to Save ScrollPosition or you not. If you do not want, make sure nothing maintains it. Disable it in the Page directive and also in the RadGrid.

Regards,
Attila Antal
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Wizard
Asked by
MBEN
Top achievements
Rank 2
Veteran
Answers by
Attila Antal
Telerik team
MBEN
Top achievements
Rank 2
Veteran
Share this question
or