Is it possible to somehow set the RadWindow to be always in maximized state?
I have a window which should be always maximized and I defined the window behaviours like the following. This works ok when I open the window at the first time but if I close the window and open it again it is in "normal" state and not maximized anymore.
8 Answers, 1 is accepted
You can achieve this behavior by using the client side API of the RadWindow control as follow :
- attach an event handler to the OnClientShow event of the Radwindow control
- in the attached function call maximize() method of the Radwindow object with boolean parameter 'true' :
I hope this helps.
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I'm using the RadWindow with the Modal Property set to "true" and need to open the rad window always maximized.
But, when using exact the same logic provided in this post, the first click works fine. But the next click opens the RadWindow shows a totally grayed window with read-only behaviour. As it is the window that should be disabled.
How do I open a new RadWindow always in maximized mode, when the window needs to be modal? Are there additional properties to set when using modal mode? I've tried to set the maximize flag to false in the close event handler, but that didn't solved the problem.
When the opener window is refreshed, the RadWindow opens fine again. But why do I need to refresh the opener window?
Please, note that the scenario of having a RadWindow which is maximized and modal at the same time is invalid - if it is maximized, it occupies all the available space and the underlying content is not accessible while the modality is used exactly for disabling the rest of the page - as you see, there is a logical problem because you try to disable something which is already unaccessible.
What actually happens is that by default at the moment when a RadWindow is maximized, it receives a very big z-index in order to show it on top of everything and the modal background forms its z-index based on the z-index of the RadWindow. However, when you again open the RadWindow the modal background is shown with its already calculated big z-index before the RadWindow has managed to maximize and thus you get the described result. We implemented a new property called ShowOnTopWhenMaximized which will help in fine - tuning this and it will be available in the official Q1 2010 release which is scheduled for March - if you explicitly set it to false, this should fix the issue.
For the time being I prepared for you a simple workaround which uses the client-side API of the RadWindow control. The idea is to remove the modality when maximizing and to restore it back on every other command - take a look at the following code snippet:
I tested this solution locally and it fixed the problem - please use this as a start point and adapt it to your scenario and let me know how it goes.
the Telerik team
I've tested the sample logic provided. It works good when setting the >InitialBehaviours="Maximize"< parameter on the RadWindow, because the new window is flickering when set only with the JS. But each subsequent call opens the new window in maximized mode as expected. :)
But, without using the Maximized mode (commented the Maximize() call and removing the InitialBehaviours attribute) the following behaviour can be reproduced:
1.) Open Window
2.) Maximize with the Icon
3.) Restore window
As result the complete screen is put into modal mode, the RAD window including so that only a browser refresh is possible to reset the page.
Is it possible to overcome this problem with js logic? The Maximized logic can be used in our case, but maybe a request comes to open the window so that the underlying page is visible. With this request it must then be possible to maximize and restore the page as needed.
Btw., we use "window.radopen" to open the new window. Is there a difference than the way you open it?
Thanks for your support!
Thank you for the detailed reproduction steps, I was able to reproduce the issue. It is caused by the already mentioned fact that the z-index of the maximized RadWindow is very big and it determines the modal overlay z-index. In order to fix the issue, please set a z-index bigger than 100000 as shown below:
However, you are saying that you use the radopen method and this means that you are using a RadWindowManager - if so, please set the z-index in the markup of the manager itself and not to the declared RadWindow.
All the best,
the Telerik team