Answered by:
Maintain vertical scroll position in TabPanel

Question
-
User-1613012676 posted
Hi,
I have a TabContainer with 3 TabPanels held inside an UpdatePanel, the TabContainer is a fixed height with Scroll Bars enabled, each TabPanel contains a selectable GridView which, when selected, displays information in a details view outwith the TabContainer.
The problem I have is when I select a row in the Gridview, the TabContainer's scroll position is reset, is there any way to maintain this?
Thursday, November 8, 2007 1:28 PM
Answers
-
User-1087479560 posted
Hi,
I think you need to use an extra hiddenField to keep the scrollTop of the panel.
1. Save scrollTop in hiddenField in beginRequest
2. Restore scrollTop from hiddenField in endRequest
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, November 13, 2007 11:04 PM
All replies
-
Thursday, November 8, 2007 2:29 PM
-
User-1613012676 posted
Thanks, I found that one before I posted my problem.
I've tried the suggestions on that thread but they don't seem to make any difference, will the fact I'm using MasterPages make any difference?
I've tried putting the code into both the MasterPage and the ContentPage but any time their is a partial postback the TabPanel scrollbars reset to the top.Friday, November 9, 2007 5:06 AM -
User-1087479560 posted
Hi,
I think you need to use an extra hiddenField to keep the scrollTop of the panel.
1. Save scrollTop in hiddenField in beginRequest
2. Restore scrollTop from hiddenField in endRequest
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, November 13, 2007 11:04 PM -
User-1050128996 posted
Can you be a little more details?
I have a master page,
my content page has a tabContainer, each tab has several LinkButton, the LinkButton has onClick event.
I need to remember the scroll position after onclick event is fired.
Can you show an example in how to do this? Save and Restore scrollTop
Saturday, June 28, 2008 12:18 AM