modality - windows within windows

2 posts, 0 answers
  1. Mac Bhyat
    Mac Bhyat avatar
    1 posts
    Member since:
    Jan 2010

    Posted 20 Jan 2010 Link to this post

    Hi,

    I am busy trying out the window controls, and I have a situation where the modality does not work as expected

    my scenario is as follows

    startup page has a window manager and button on the page - click on the button cause window 1 to open up as follows:

    var oWin = window.radopen('WebForm1.aspx', null);

    oWin.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);

    oWin.set_modal(true);

    oWin.set_visibleStatusbar(false);

    window.setTimeout(function() { oWin.setActive(true); }, 0);



    WebForm1 then has a button on it two open up another window as follows

     

    var oBrowserWnd = GetRadWindow().BrowserWindow;

     

     

    var oWin = oBrowserWnd.open("WebForm2.aspx",null);

     

    oWin.set_behaviors(oBrowserWnd.Telerik.Web.UI.WindowBehaviors.Move + oBrowserWnd.Telerik.Web.UI.WindowBehaviors.Close);

    oWin.set_modal(

    true);

     

    window.setTimeout(

    function() { oWin.setActive(true); }, 100);

     



    WebForm2 then has a button on it that reopens another instance of webform2 as follows:

     

    var oBrowserWnd = GetRadWindow().BrowserWindow();

     

     

    var oWin = oBrowserWnd.radopen("WebForm2.aspx", null);

     

    oWin.set_behaviors(oBrowserWnd.Telerik.Web.UI.WindowBehaviors.Move + oBrowserWnd.Telerik.Web.UI.WindowBehaviors.Close);

    oWin.set_modal(

    true);

     

    window.setTimeout(

    function() { oWin.setActive(true); }, 100);

     



    The idea is to get windows spawning windows -

    Now that part works, the problem is that when webform1 opens it's modal to the parent (correct) but when webform2 opens it's not modal to webform1 (I can still click on webform1), however if I click to open another window in webform2, webform1 suddenly becomes modal and both webform2's are not
    So it looks like Telerik is allowing a maximum of 2 forms to be active at the same time, and not only 1

    Does anyone have any ideas ?

    Thanks

    Mac
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 21 Jan 2010 Link to this post

    Hi Mac,

    I checked the code and the only problem that I see is in the JavaScript function that you use on the second dialog:
    var oBrowserWnd = GetRadWindow().BrowserWindow();
    should be
    var oBrowserWnd = GetRadWindow().BrowserWindow;

    Other than that, the code is working as expected as you can see from the attached video. Could you please check your code and if the problem persists - to send us a small sample project in a support ticket so we could check it locally?



    Greetings,
    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.
Back to Top