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

Miss-align the radWindow

1 Answer 47 Views
Window
This is a migrated thread and some comments may be shown as answers.
Hock Sing Ting
Top achievements
Rank 1
Hock Sing Ting asked on 27 Aug 2013, 02:23 AM
Hi,

Vesion : Q2 2012 SP2
Browser : IE7
OS : XP

We have a link which will open a new radWindow.
Most of the time, the radWindow is open normally which is in the center of the browser.
But, few times, it is miss-align, you can refer to the screen capture attched.
Below are the script we open the radWindow.

 function openWin(xmlName, ID1, ID2) {
            var oWnd = radopen("filename", "RadWindow2");
            oWnd.setSize(980, 580);
            oWnd.SetModal(true);
            oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.None);
            oWnd.show();
        }

Do you have any idea why it cause the miss-align?

Thanks,
KyLeow

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 28 Aug 2013, 10:54 AM
Hi,

There shouldn't be an issue with the popup's position, yet for small screen sizes that are insufficient to contain it there may be some issues. What I can suggest that you try is the following:
- avoid calling show() again
- move the popup to (0,0) first before resizing to let it have as much space as possible
- use the current API of the control
- set its KeepInScreenBounds property to true to prevent its titlebar from going out of the viewport
- make sure there aren't JavaScript errors on the page
- try the latest version, which is one year newer

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" KeepInScreenBounds="true">
</telerik:RadWindowManager>
<asp:Button ID="Button1" Text="open the popup" OnClientClick="openWin(); return false;" runat="server" />
<script type="text/javascript">
    function openWin(xmlName, ID1, ID2)
    {
        var oWnd = radopen("filename", "RadWindow2");
        oWnd.moveTo(0, 0);
        oWnd.setSize(980, 580);
        oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.None);
        oWnd.set_modal(true);
    }
</script>



Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Window
Asked by
Hock Sing Ting
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or