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

Keeping scroll position of details after postback

2 Answers 147 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 2
Alex asked on 04 Nov 2010, 11:29 PM
Hi,

I've implemented the example suggested in the following thread:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/separate-scrolls-for-inner-tables-in-hierarchical-grid.aspx

And I was wondering if there was a way to keep the scroll position of the <Div> for the details?
My Details has several controls that cause postbacks and each time the positionning is reset.

Thanks

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 05 Nov 2010, 10:17 AM
Hello Alex,

Since the scrollable <div>s that you are adding is not managed by the RadGrid control, it does not take care of persisting the scroll position. You will have to store it somewhere manually and set it again after postbacks / AJAX requests. Use an onscroll event handler for the <div> to save the scrollTop and scrollLeft DOM element properties, and the OnResponseEnd RadAjaxManager client event to restore them.

Sincerely yours,
Dimo
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
Alex
Top achievements
Rank 2
answered on 05 Nov 2010, 04:50 PM
Thanks for the response, I understand that the DIV isn't managed by the radgrid I was just hoping someone might've already done something.

There's a bunch of examples outthere just need to adapt one of them to my needs, just hope against hope that there was already something available ;)
Tags
Grid
Asked by
Alex
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Alex
Top achievements
Rank 2
Share this question
or