z order of radwindow

12 posts, 1 answers
  1. Roger
    Roger avatar
    183 posts
    Member since:
    Sep 2007

    Posted 06 Apr 2009 Link to this post

    Hi,
    I have a master/cxontent pahe with a radwindow manager on it. From this I call a radwindow which opens fine and is modal. Then from the radwindow I open another modal radwindow but this radwindow appears under the first radwindow. I want it to appear on top, so how do I set the z order (if this is the problem).

    I have tried both opening methods as recommended :

    var oBrowserWnd = GetRadWindow().BrowserWindow;
    oBrowserWnd.radopen("http://www.google.com", "NewWindow");

    and

    var oManager = GetRadWindow().get_windowManager();
    oManager.open("http://www.google.com", "NewWindow");

    but they both end up under the calling RadWindow. The version is: 2009.1.311.35

    Regards
    Roger
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Apr 2009 Link to this post

    Hello Roger,

    Try setting the second RadWindow as modal using the set_modal() method. I tried below code for implementing the scenario. Give a try with this and see whether it suits you.

    Main page [ASPX]:
     
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">   
    <Windows>  
        <telerik:RadWindow Modal="true" runat="server" NavigateUrl="Page1.aspx" ID="Window1" Width="500" Height="300" OpenerElementID="Button1" ></telerik:RadWindow>  
    </Windows>  
    </telerik:RadWindowManager>           
    <input id="Button1" type="button" value="Open Window" /> 

    Page1 [ASPX]:
     
    <input id="Button1" type="button" value="button"  onclick="openWindow2();"/> 

    Page1 [JavaScript]:
     
    <script type="text/javascript">   
    function openWindow2()   
    {   
        var oBrowserWnd = GetRadWindow().BrowserWindow;   
        var oWnd = oBrowserWnd.radopen("http://www.google.com""NewWindow");  
        oWnd.set_modal(true);  // Setting the second RadWindow as modal   
    }   
    function GetRadWindow()   
    {   
      var oWindow = null;   
      if (window.radWindow)   
         oWindow = window.radWindow;   
      else if (window.frameElement.radWindow)   
         oWindow = window.frameElement.radWindow;   
      return oWindow;   
    }   
    </script>  

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 07 Apr 2009 Link to this post

    Hello Roger,

    When you open the second RadWindow, you need to call its setActive(true) method.
    i.e. (sample code taken from Returning Values from a Dialog demo - Dialog1.aspx)
    function openWin2() 
        var parentPage = GetRadWindow().BrowserWindow; 
        var parentRadWindowManager = parentPage.GetRadWindowManager(); 
        var oWnd2 = parentRadWindowManager.open("Dialog2.aspx","RadWindow2"); 
        window.setTimeout(function() 
        { 
            oWnd2.setActive(true); 
        },0); 

    I hope this helps.


    All the best,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  5. Roger
    Roger avatar
    183 posts
    Member since:
    Sep 2007

    Posted 07 Apr 2009 Link to this post

    Hi Georgi,

    I tried the setActive(true) first without fully reading the script and it didn't work. The important bit is calling the timeOut function. Once this was in place the second radwindow popped on top.

     

    However I've also got to give credit to Shinu as the top window wasn't modal & if I clicked anwhere on the first radwindow the second radwindow dissapeared again.

    The solution to all this was to combine the 2 solutions given, so the timeOut function became:

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

    Now the seciond radWindow appears on top and is modal with respect to the first radWindow and the parent Window.

    Regards
    Roger
  6. Robert
    Robert avatar
    9 posts
    Member since:
    Mar 2008

    Posted 01 Jun 2009 Link to this post

    I am trying to accomplish the same thing.

    However, my first or parent radwindow's initial state is set to maximized.

    The examples provided to not work when the parent window is maximized....the second radwindow always appears behind the maximized radwindow.

    If I do not have it maximized, the examples provided work.

    does anyone know a way around this?
  7. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 02 Jun 2009 Link to this post

    Hi Robert,

    By design a maximized RadWindow will always be rendered on top of any other RadControls on the page. There is a way to change its z-index, however we do not recommend it as it will interfere with the window activation logic.

    Regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Robert
    Robert avatar
    9 posts
    Member since:
    Mar 2008

    Posted 02 Jun 2009 Link to this post

    Thanks for the reply.

    I would like to make a suggestion for this not to be the case.

    I love the RadWindow concept and I think it is a great tool to provide a rich client experience to browsers.

    The use of the term "window" and the fact that it offers the ability to minimize, resize and maximize implies that it will act like normal "windows" that you use everyday with a microsoft based operating system.

    Following that pattern, a maximized window does not mean it is always on top of other windows.  I can have as many maximized windows on me screen as I want, but whatever window has the focus is on top.

    It would be great if RadWindows maintained that pattern.
  9. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 02 Jun 2009 Link to this post

    OK Robert,

    I will log this as a feature request for one of the future versions of the control.


    Regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. Kyle
    Kyle avatar
    5 posts
    Member since:
    Feb 2012

    Posted 23 Apr 2012 Link to this post

    Has this feature request been addressed or researched?  I'm using Q1 2012 SP1 and the maximized window is still remaining on top of any child windows that are opened from that maximized window.
  11. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 24 Apr 2012 Link to this post

    Hi Kyle,

    Try setting ShowOnTopWhenMaximized property of RadWindow to false which will prevent this z-index increase and the control will behave the same way in maximized and non-maximized state. The default value of this property is true.

    Thanks,
    Princy.
  12. Aaron Whittaker
    Aaron Whittaker avatar
    15 posts
    Member since:
    Jan 2007

    Posted 22 Jul 2013 Link to this post

     HI,

       Is there a way to open radwindow on different monitor rather than on the same monitor. Has anyone tried it?


    Thanks
  13. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Jul 2013 Link to this post

    Hi Aaron,

    As far as I know, Telerik is not providing such a feature with their RadControls.

    Thanks,
    Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017