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

z order of radwindow

11 Answers 344 Views
Window
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 07 Apr 2009, 03:07 AM
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

11 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Apr 2009, 05:24 AM
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.
0
Accepted
Georgi Tunev
Telerik team
answered on 07 Apr 2009, 06:27 AM
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.
0
Roger
Top achievements
Rank 1
answered on 07 Apr 2009, 10:03 PM

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
0
Robert
Top achievements
Rank 1
answered on 01 Jun 2009, 04:41 PM
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?
0
Georgi Tunev
Telerik team
answered on 02 Jun 2009, 08:57 AM
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.
0
Robert
Top achievements
Rank 1
answered on 02 Jun 2009, 12:41 PM
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.
0
Georgi Tunev
Telerik team
answered on 02 Jun 2009, 12:58 PM
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.
0
Kyle
Top achievements
Rank 1
answered on 23 Apr 2012, 07:50 PM
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.
0
Princy
Top achievements
Rank 2
answered on 24 Apr 2012, 09:59 AM
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.
0
Aaron Whittaker
Top achievements
Rank 1
answered on 22 Jul 2013, 04:26 PM
 HI,

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


Thanks
0
Shinu
Top achievements
Rank 2
answered on 23 Jul 2013, 06:45 AM
Hi Aaron,

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

Thanks,
Shinu.
Tags
Window
Asked by
Roger
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Georgi Tunev
Telerik team
Roger
Top achievements
Rank 1
Robert
Top achievements
Rank 1
Kyle
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Aaron Whittaker
Top achievements
Rank 1
Share this question
or