Hello everyone, I am using an UltraWebTab on a page and have encountered a problem with scrolling.
Basically, when I scroll down a tab (there are more controls on the tab than actually fit), if a postback occurs, say on a button click, the page comes back with the scroll position set at the top of the tab. Is there any way to maintain the scroll position on a postback?
Thanks for any ideas,
Karen.
Hi,
Try to using following JavaScript.
<script type="text/javascript" id="Infragistics">
<!--
var hide;
var tab;
function getpos() {
hide = document.getElementById("HiddenField1");
tab = document.getElementById("UltraWebTab1_div0");
hide.value = tab.scrollTop;
}
function UltraWebTab1_InitializeTabs(oWebTab){
tab.scrollTop = hide.value;
// -->
</script>
The whole idea is: when you click on button you have to set scroll position of the rendered ID of the WebTab to the value of the hidden field and when initialize the tab after postpack, you assign it back to the scroll bar top value. It does work and yu can modify using different logic.