Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
WebTab loses scroll position on postback
posted

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.

Parents
No Data
Reply
  • 995
    posted

    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 = document.getElementById("UltraWebTab1_div0");

                hide = document.getElementById("HiddenField1");

                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.  

Children
No Data