RadWindow Modal not working in MOSS

2 posts, 0 answers
  1. Saravanan
    Saravanan avatar
    12 posts
    Member since:
    Aug 2010

    Posted 16 Aug 2011 Link to this post

    Hello telerik team, i am trying to show a modal popup using RadWindow. It is working fine in SP2010. but in Sharepoint 2007 (MOSS) i am able to access the parent (Page) scrollbar. i need to restrict that. i have attached the code as image. Could i get some suggestions.
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4627 posts

    Posted 17 Aug 2011 Link to this post

    Hello Paramahamsa,

      If the page has a scrollbar you will be able to scroll it if the RadWindow is modal. This is due to the fact that you cannot take an element from the page on top of the scrollbar (i.e. the modal overlay). If you wish to disable the scrollbars you can do so when the RadWIndow is shown and restore them when it is closed, for example:
    var bodyOverflow = ""
    var htmlOverflow = ""
    function openRadWindow(width, height) 
        //store the overflow 
        bodyOverflow = document.body.style.overflow; 
        htmlOverflow = document.documentElement.style.overflow; 
        //hide the overflow 
        document.body.style.overflow = "hidden"
        document.documentElement.style.overflow = "hidden"
        var oWnd = window.radopen(null, "RadWindow1"); 
        oWnd.setSize(width, height); 
        oWnd.center(); 
    }
      
    function OnClientClose(sender, args) 
        //restore the overflow 
        document.body.style.overflow = bodyOverflow; 
        document.documentElement.style.overflow = htmlOverflow; 
    }

    If I have misunderstood your issue and you are actually getting scrollbars because you show it then what you can do is try to set its dimensions in the markup, so that it will automatically calculate its position according to them, without the added moving and resizing.

      You can also try to call the moveTo and resize functions with a small timeout (you can start with about 300 for example and reduce it if it works), and even 0 milliseconds may suffice.

    Best wishes,
    Marin
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top