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

[Solved] Window Manager Settings Ignored

6 Answers 265 Views
Window
This is a migrated thread and some comments may be shown as answers.
urbanBaldGuy
Top achievements
Rank 1
urbanBaldGuy asked on 06 Nov 2007, 08:17 PM

I have a window manager on my page.  When I open the window the first time all of the default properties are enforced (behaviors, etc).

When I try to launch the window the second time none of the behaviors are enforced (there are no buttons at all).

Here is my javascript:

<script>  
        function MenuClickHandler(argCommandName)  
        {  
            var oManager = $find("<%=rwmMainWindowManager.ClientID%>");  
            switch (argCommandName)  
            {  
                case 'AddCustomer':  
                    oManager.open('NewCustomer.aspx',argCommandName);  
                    break;  
                case 'AddUser':  
                    oManager.open('NewUser.aspx',argCommandName);  
                    break;  
                case 'EditUser':  
                    oManager.open('EditUser.aspx',argCommandName);  
                    break;  
                case 'MinimizeAll':  
                    oManager.minimizeAll();  
                    break;  
                case 'Cascade':  
                    oManager().cascade();  
                    break;  
                case 'Tile':  
                    oManager().tile();  
                    break;  
                default:  
                    alert("Invalid Command Specified - '" + argCommandName + "'");  
                    break;  
            }  
        }  
          
        function QuickNavHandler(sender, e)  
        {  
            MenuClickHandler(sender.CommandName);  
            return false;  
        }  
        </script> 

Here is the window manager:

<telerik:RadWindowManager ID="rwmMainWindowManager" runat="server" Skin="Vista" EnableEmbeddedSkins="True" DestroyOnClose="true" 
        VisibleOnPageLoad="false" OffsetElementID="divWindowLoader" VisibleStatusbar="False" ReloadOnShow="True" /> 

This does not occur if I do not set "DestroyOnClose" to "True".

6 Answers, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 07 Nov 2007, 04:13 PM
Hi urbanBaldGuy,

The problem you experience is exactly because of the DestroyOnClose = True. When a RadWindow is closed it is hidden but it is not destroyed so the next time you open it you see it with its settings. By setting DestroyOnClose to true the window object is destroyed and then when you try to open it there opens a new window with the default settings. Why do you need to the DestroyOnClose proeperty to be true? Please, provide more information so we can advise you in the right direction.

Greetings,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
urbanBaldGuy
Top achievements
Rank 1
answered on 07 Nov 2007, 04:31 PM
I understand that is how it work.  I would be okay with it if it would use the default settings.  However, none of the controls (Minimize, Maximize, etc.) show the second time.

I have changed my window manager to the following but it still does not use the "Behaviors"

<telerik:RadWindowManager ID="rwmMainWindowManager" runat="server" Skin="Vista" EnableEmbeddedSkins="True" DestroyOnClose="true"    
        VisibleOnPageLoad="false" OffsetElementID="divWindowLoader" VisibleStatusbar="False" Behaviors="Maximize,Minimize,Move,Reload,Resize,Close" Width="600px" Height="400px" />   


The reason I am using DestoryOnClose is that I don't like the refresh that happens when you don't.  Even if you have VisibleOnPageLoad="false" it still display then window and stalls for a few seconds.
0
urbanBaldGuy
Top achievements
Rank 1
answered on 07 Nov 2007, 04:31 PM
I understand that is how it work.  I would be okay with it if it would use the default settings.  However, none of the controls (Minimize, Maximize, etc.) show the second time.

I have changed my window manager to the following but it still does not use the "Behaviors"

<telerik:RadWindowManager ID="rwmMainWindowManager" runat="server" Skin="Vista" EnableEmbeddedSkins="True" DestroyOnClose="true"    
        VisibleOnPageLoad="false" OffsetElementID="divWindowLoader" VisibleStatusbar="False" Behaviors="Maximize,Minimize,Move,Reload,Resize,Close" Width="600px" Height="400px" />   


The reason I am using DestoryOnClose is that I don't like the refresh that happens when you don't.  Even if you have VisibleOnPageLoad="false" it still display then window and stalls for a few seconds.
0
Petya
Telerik team
answered on 08 Nov 2007, 02:16 PM
Hello urbanBaldGuy,

Please, use the following way of opening the windows:

radopen('Default2.aspx', null);

In this way a new window is created each time and it will have the desired default settings.

Sincerely yours,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
urbanBaldGuy
Top achievements
Rank 1
answered on 08 Nov 2007, 04:59 PM
That creates another problem.  I don't want people to be able to open multiple instances of the same window.  I have temporarily changed the destroyonclose property back to true.
0
Georgi Tunev
Telerik team
answered on 09 Nov 2007, 11:43 AM
Hi,

If you can send us a small sample project that reproduces your setup along with detailed information on how exactly you wish the RadWindow to behave with your logic, we will do our best to provide the most appropriate solution for your case.


Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
urbanBaldGuy
Top achievements
Rank 1
Answers by
Petya
Telerik team
urbanBaldGuy
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or