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

Scroll to top after callback isn't working

1 Answer 135 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
bemara57
Top achievements
Rank 1
bemara57 asked on 23 May 2008, 12:24 AM
I'm running into this problem where I can scroll to the top of the page after a call back. I have a tab strip with a multipage below it. When I scroll to the bottom to click a button, I've put this in the button click's code-behind:

        RadTabStrip tabStrip = (RadTabStrip)Page.FindControl("RadTabStrip1");
        if (checkoutTabStrip != null)
        {
            tabStrip.SelectedIndex = 1;
            tabStrip.MultiPage.SelectedIndex = 1;
        }

        RadAjaxManager.GetCurrent(this.Page).ResponseScripts.Add("window.scrollTo(0,0);");

This seems to work and when the button is clicked, the page does scroll to the top- for a second!! Then it scrolls back to the bottom where the button was clicked. I tried turning off the scroll position thru .NET but this didn't do anything:

MaintainScrollPositionOnPostback="false"

Is there a Telerik property that's controlling this? I can't seem to make my scroll to the top stick because I don't know what, but something is coming after my scrollTo(0,0) and scrolls it back down. Any ideas on this?

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 27 May 2008, 06:25 AM
Hi,

To see more information on the requested functionality, please refer to the following article.
I hope this information helps.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
bemara57
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or