Hello,
I have a tabstrip with the multipage's scrollbar property set to 'auto'. When the content inside the pageview grows too large, the scrollbar appears and works excellently.
However, anytime there is an ajax postback on the page, the pageview's scrollbar gets reset to the top. I was just wondering if there is a relatively simple way to force the pageview to remember its scroll position after a postback.
Using Q2 2010 and IE7
Thank you,
Josh
I have a tabstrip with the multipage's scrollbar property set to 'auto'. When the content inside the pageview grows too large, the scrollbar appears and works excellently.
However, anytime there is an ajax postback on the page, the pageview's scrollbar gets reset to the top. I was just wondering if there is a relatively simple way to force the pageview to remember its scroll position after a postback.
Using Q2 2010 and IE7
Thank you,
Josh
4 Answers, 1 is accepted
0
Accepted
Hi Josh,
You can use OnRequestStart and OnResponseEnd client-side events of the ajax manager to save the scroll position and then use it to scroll the pageview. Let me know weather this approach is suitable for you.
Best regards,
Yana
the Telerik team
You can use OnRequestStart and OnResponseEnd client-side events of the ajax manager to save the scroll position and then use it to scroll the pageview. Let me know weather this approach is suitable for you.
Best regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Josh
Top achievements
Rank 1
answered on 31 Aug 2010, 06:09 PM
Hello Yana,
Thanks for the information. I have implemented this:
It is working. Code posted for anyone with the same problem.
Josh
Thanks for the information. I have implemented this:
var
scrollPosition;
function
beginRequest(sender, args) {
var
multiPage = $find(
"<%= multiPage.ClientID %>"
);
var
currentPage = multiPage.get_selectedPageView();
var
element = currentPage.get_element();
scrollPosition = element.scrollTop;
}
function
endResponse(sender, args) {
var
multiPage = $find(
"<%= multiPage.ClientID %>"
);
var
currentPage = multiPage.get_selectedPageView();
var
element = currentPage.get_element();
element.scrollTop = scrollPosition;
}
It is working. Code posted for anyone with the same problem.
Josh
0
Ray Merckel
Top achievements
Rank 2
answered on 06 Apr 2011, 07:56 PM
is there any code behind or just the javascript...
thank you
ray
thank you
ray
0
Hi Ray Merckel,
It's just the javascript as we're using client events in this case.
All the best,
Yana
the Telerik team
It's just the javascript as we're using client events in this case.
All the best,
Yana
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items