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

RadAlert on top disabling application

2 Answers 90 Views
Window
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 13 Mar 2012, 11:06 AM
Hello,

some days before I faced a strange behavior. I tried to show a radAlert window, from a modal radWindow, on top of all windows, so I set its z-index clientside like this:

_radalert.get_popupElement().style.zIndex = 100000;

The problem was that the radAlert was shown on top, but the gray-color panel was placed behind the radWindow, so the radWindow remained active, not disabled.

Finally I found a solution, setting this property, too:

_radalert.get_popupElement().style.zIndex = 100001;
_radalert._modalExtender._backgroundElement.style.zIndex = 100000;


What I would like to know is if there is a public property or a 'get' method to access the private object "_modalExtender"

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Luis
Top achievements
Rank 1
answered on 13 Mar 2012, 02:52 PM
It's surprising for me.

This solution only works for the first time. I don't know if it is a reasonable behavior, but every new radWindows has, as zindex value, the value of the last radWindow incremented, by one I suppose, so when the first radAlert is shown and its zindex modified with my code, next radWindow will have a zindex greater than 100000.

I have modified my code, and now it seems to work:
(no reason to choose 5, could be another number)

_radalert.get_popupElement().style.zIndex += 5;
_radalert._modalExtender._backgroundElement.style.zIndex += 5;

0
Marin Bratanov
Telerik team
answered on 14 Mar 2012, 04:08 PM
Hi Luis,

Since you already have found a way to get things working in  your scenario you can keep using it if it fits your needs. Nevertheless, below I will answer your questions and provide some more information on the way the control works:

1) if there is a public property or a 'get' method to access the private object "_modalExtender"
No, there isn't. This is part of the internal control's functionality and for common tasks that use it there is a public method that wraps the functionality (e.g. set_modal()). Having the need to externally modify something from this layer is very rare.

2) every new radWindows has, as zindex value, the value of the last radWindow incremented
Yes, this is true for the RadWindows from the RadWindowManager's Windows collection. This is necessary for the proper functioning of the control, because setting an active RadWindow requires that you increase its z-index value, as this is the only way to bring an HTML element to the front. This is why the RadWindowManager tracks the z-index values it has assigned so far and opens the next one with a higher value. The same applies for the predefined dialogs as well, so if you open your first RadWindow from the manager you shouldn't have such an issue if you have configured the z-index properly.

To get ahead and answer the "how do I configure it properly" question - set the property to the manager, e.g.:
<telerik:RadWindowManager runat="server" ID="rwm1" Style="z-index:10000">
        <Windows>
             . . . . .
and not for the individual RadWindow. Setting it for the individual control means you always want this z-index and  the manager cannot properly calculate the further values.


Kind regards,
Marin
the Telerik team
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 their blog feed now.
Tags
Window
Asked by
Luis
Top achievements
Rank 1
Answers by
Luis
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or