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

Maintain Minimize State _ RadWindow

3 Answers 115 Views
Window
This is a migrated thread and some comments may be shown as answers.
Dipti
Top achievements
Rank 1
Dipti asked on 12 Aug 2008, 10:41 AM


Hi  Georgi Tunev,

I need some help regarding  rad windows like,

I want rad windows create dynamically and when i minimize the rad windows
it minimizes to a rad treeview in a list manner and maintain its state whether minimized or normal after a postback or refresh..and some custom configuration when it minimized in a rad treeview.


Thanks

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 12 Aug 2008, 01:33 PM
Hello Dipti,

I have already answered you in your other forum post. For convenience I am pasting my reply below:


I am not sure what exactly you want to achieve - what do you mean by minimizing in a treeview? As for persisting the state of the RadWindows in postbacks, with the current version of the control, this is theoretically possible, however the implementation will be very complex and I cannot guarantee that it would work in all scenarios.
The good news however is that providing such feature for RadWindow for ASP.NET AJAX is in our ToDo list for one of the following releases.

Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dipti
Top achievements
Rank 1
answered on 13 Aug 2008, 06:47 AM
Thanks Georgi Tunev, for your reply

It will be great if you can give me any kind of sample or example
how to trap the minimize state of a Rad window so that in a postback or refresh of a page i can get the actual state of the window.

Any sort of help really appreciated.


Thanks

0
Sean
Top achievements
Rank 2
answered on 13 Aug 2008, 05:21 PM
I have a project here that gets you along the correct path, I think.  Using the 'PreserveClientState' the window will reload into the correct state.

Two issues I have found (and did not have time to investigate further):

1. If you do not specify the content to be loaded directly in the window, it will reload to a blank window. You have to either set the NavigateUrl in the window or do it in your reload method somewhere.

2. The isMaximized() and isMinimized() methods both return false on the page reloading. This presumes that the 'state' is not defined in the object when you minimize or maximize it. It is recalled from ViewState, but it is not explicitly set in the Window. A bug? Or maybe I am not seeing how to extract it?

Anyway, I have two buttons, one opens the window, the other executes a postback. The window reloads and then resizes to the last known state.

Thanks for listening.

<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" OutputCompression="AutoDetect">  
        </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        </telerik:RadAjaxManager> 
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" Skin="Telerik" /> 
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Telerik" Height="500px" Width="500px" 
         ReloadOnShow="true" ShowContentDuringLoad="true"  PreserveClientState="true">  
            <Windows> 
                <telerik:RadWindow ID="Window1" runat="server" NavigateUrl="Window.aspx"  OnClientShow="GetWindowState">  
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 
        <asp:Button ID="btnOpen" runat="server" OnClientClick="ShowWindow();return false;" Text="Open" /><br /> 
        <asp:Button ID="btnPostback" runat="server" Text="Post" /> 
          
    </div> 
    </form> 
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">  
    <script language="javascript" type="text/javascript">  
        function ShowWindow() {  
            window.radopen("Window.aspx", "Window1");  
            return false;  
        }  
        function GetWindowState(sender, e) {  
                alert("Id: " + sender.get_id());  
                alert("Is Minimized: " + sender.isMinimized());  
                alert("Is Maximized: " + sender.isMaximized());  
                alert("NavigateURL:" + sender.get_navigateUrl());  
     
            }  
        //http: //www.telerik.com/help/aspnet-ajax/window_programmingradwindowmethods.html  
    </script> 
      
    </telerik:RadScriptBlock> 
</body> 


Sean
Electronic Arts, Orlando FL
Tags
Window
Asked by
Dipti
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Dipti
Top achievements
Rank 1
Sean
Top achievements
Rank 2
Share this question
or