This is a migrated thread and some comments may be shown as answers.

radWindow modal="true" causes horizontal scrollbar in parentWindow

4 Answers 472 Views
Window
This is a migrated thread and some comments may be shown as answers.
Paul J
Top achievements
Rank 1
Paul J asked on 02 Nov 2009, 05:22 PM
I have a page that displays a radWindow. If modal is set to "true" it displays a horizontal scrollbar on my parent page. if set to "false", it doesn't.

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
    <script type="text/javascript"
 
 function ShowWindow() 
            {                    
        
          var wnd = window.radopen("window.aspx", "win");      
                      wnd.restore(); 
                  wnd.setSize(document.body.scrollWidth-170,document.body.scrollHeight+180); 
                   wnd.center();            
            } 
             
        </script> 
    </telerik:RadCodeBlock> 
     
 
                        <asp:Button ID="button" runat="server" Text="Show" CssClass="button" OnClientClick="ShowWindow();return false;"/> 
               
     
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" style="overflow:hidden;"
        <Windows> 
            <telerik:RadWindow ID="win" VisibleStatusbar="false" KeepInScreenBounds="true"  
            DestroyOnClose="false" runat="server" InitialBehaviors="Close,Move,Resize" Behaviors="Close,Move,Resize"  
            ShowContentDuringLoad="true" Skin="Simple" Overlay="true" Modal="true" Title="Window"
            </telerik:RadWindow> 
        </Windows> 
         
    </telerik:RadWindowManager> 

I narrowed this down to probably an issue with the width and height of the ModalOverlay. because if I add the following styles,

 .TelerikModalOverlay    
 {     
  width:100% !important; 
  height:100% !important; 
 }  


 it eliminates the scrollbars on the parent page, however, causes strange issues when then moving the radWindow from its default position (i.e. the widthand height of the Modal Overlay no longer reach the bounds of the parent page if the radWindows is moved around)


Any ideas on how to fix this one way or another?

4 Answers, 1 is accepted

Sort by
0
Paul J
Top achievements
Rank 1
answered on 02 Nov 2009, 05:34 PM
Forgot to mention that if i set DestroyOnClose to false (while not using the mentioned style fixes), when the window opens initially, the horizontal scrollbar is there, but if I close and then open it again, it's no longer there.

strange if you ask me.
0
Accepted
Georgi Tunev
Telerik team
answered on 03 Nov 2009, 02:42 PM
Hello Paul J,

In your case, I would suggest not to set the modality of the window before sizing it - this is the reason why the scrollbars appear. Remove the modal property from the declaration and set it dynamically when you open the window.
e.g.
function ShowWindow()
{
 
    var wnd = window.radopen("window.aspx", "win");
    wnd.restore();
    wnd.setSize(document.body.scrollWidth - 170, document.body.scrollHeight + 180);
    wnd.set_modal(true);
    wnd.center();
}


Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Paul J
Top achievements
Rank 1
answered on 03 Nov 2009, 02:47 PM
Worked like a charm. Thanks Georgi ! The little things always get me ;)
0
Camilo
Top achievements
Rank 1
answered on 27 Dec 2010, 08:03 PM
In addition to what is mentioned, personally probe with:
overflowhidden !important;

Quedando así:

.TelerikModalOverlay
{
    width99.9% !important;
    height100% !important;
    overflowhidden !important;
}
Tags
Window
Asked by
Paul J
Top achievements
Rank 1
Answers by
Paul J
Top achievements
Rank 1
Georgi Tunev
Telerik team
Camilo
Top achievements
Rank 1
Share this question
or