Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Window > Remove or hide scroll bars from RadWindow
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered Remove or hide scroll bars from RadWindow

Feed from this thread
  • manoj naik avatar

    Posted on May 11, 2011 (permalink)

    Hi,

    I have a button from where I am calling a function to show a Radwindow. The function is working fine. Scroll bars do not appear in it, but however I have those disabled scrollbar effect on the right hand side of the window. How can I remove this?
    I have tried overflow:hidden. But it doesn't work.

    function OpenMyRadWindow(URL) {   
    var window = $find("ctl00_MyRadWindow");
    window.setUrl(URL);   
    window.show();
    document.body.style.overflow = 'hidden';   
    return;
    }

    Regards,
    Manoj

  • Posted on May 12, 2011 (permalink)

    Hello Manoj,

    You can set the AutoSize property of the RadWindow to True in order to autosizing the radwindow according to content, which will inturn hides the scrollbars.

    Adding the following style in the page that is loaded in RadWindow will hide the scrollbars.

    CSS:

    <style type="text/css">  
        HTML  
        {  
            overflow-x: hidden;  
        }  
    </style>

    Thanks,
    Shinu.

  • manoj naik avatar

    Posted on May 12, 2011 (permalink)

    Hi Shinu,

    Thanks for your reply. The Autosize property is set to "true". And I cant set the style you mentioned directly in CSS. Because the page I am showing is one of the page in the site. If I apply this style to it then even while normally browsing the page I wont see the scroll bars!

    Regards,
    Manoj

  • Marin Bratanov Marin Bratanov admin's avatar

    Posted on May 13, 2011 (permalink)

    Hi Manoj,

    If you want to disable the scrollbars from the main page while the RadWindow is visible I suggest that you:

    1. attach to the OnClientShow event of the RadWindow
    2. add the suggested CSS programatically via JavaScript
    3. attach to the OnClientClose event of the RadWindow
    4. remove the CSS rule when the RadWindow is closed

    Here is an example:

    var oldOverflow = "";        
     
    function OnClientShow()
    {
        oldOverflow = document.body.style.overflow;
        document.body.style.overflow = "hidden";
    }
     
    function OnClientClose()
    {
        document.body.style.overflow = oldOverflow;
    }

    If the above solution does not work for you please open a support ticket and send us a sample that shows the issue you are having with our controls so that we can debug it locally and pinpoint the cause.


    Kind regards,
    Marin
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Window > Remove or hide scroll bars from RadWindow