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

Opening window only using RadWindow manager

3 Answers 175 Views
Window
This is a migrated thread and some comments may be shown as answers.
Madhu
Top achievements
Rank 1
Madhu asked on 21 Apr 2008, 01:40 PM
Hi,
I am opening a new radwindow only using the Radwindow Manager control and the javascript function on the Master page. But once the master page is postback the window opened before dispappers. Does the Radwindow is opened only for that instance it is active. Here is the code I am using in master page.

<radW:RadWindowManager ID="RadWindowManager1" InitialBehavior=Minimize Width="500px" Height="400px" runat="server">

</radW:RadWindowManager>

If Not IsPostBack Then
               
                    Dim sScript As String = "<script for='window' event='onload' type=""text/javascript"">"

                    sScript += "  var oWnd = window.radopen(""WFTaskTrack.aspx"", ""RadWindow1"");"
                    'sScript += "   oWnd.Center();"

                    sScript += "</Script>"
                    Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "", sScript)
End If



Thnx

3 Answers, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 23 Apr 2008, 04:17 PM
Hi Madhu,

Currently RadWindow' state is not persisted after a postback. Therefore if the window is not recreated after a postback it will disappear. If you want to persist window's state after a postback you could override the save and load of the ViewState and store the properties of the RadWindows there. If you simply want to have the window opened on page load and does not disappear after a postback I suggest you add the window in the windows collection of the RadWindowManager and set its VisibleOnPageLoad property to true, e. g.:

<telerik:RadWindowManager ID="RadWindowManager1" Width="500px" Height="400px" runat="server">   
<Windows>   
     <telerik:RadWindow ID="RadWindow1"   
     NavigateUrl = "WFTaskTrack.aspx"   
     visibleonpageload="true" 
     runat="server"></telerik:RadWindow> 
</Windows> 
</telerik:RadWindowManager>  

If you need further assistance, do contact us again.

Best wishes,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Craig
Top achievements
Rank 1
answered on 07 Feb 2009, 01:49 AM
You mentioned "If you want to persist window's state after a postback you could override the save and load of the ViewState and store the properties of the RadWindows there."

This is exactly what I want to do.  WOuld you please provide more detail (sample).

Thank you
0
Georgi Tunev
Telerik team
answered on 09 Feb 2009, 11:55 AM
Hello Craig,

I have already answered your support ticket on the same subject. For convenience I am pasting my reply below:

We cannot provide a demo of the approach that is discussed in the forum as our support is focused on control's present functionality and we don't provide custom solutions.
Should you decide to implement a custom logic, please note that this will not be an easy task. Basically, what you need to do is to use RadWindow's client-side API to get the needed information (width, height, navigate Url, behaviors, etc.) and to store them in a hidden field or in the session when you click on a different tab - then, after the new tab is opened, you should read these values and set them to a new RadWindow object.
As an alternative, I can suggest to use Ajax / RadAjax to ajaxify the tabstrip. This way there will be no postback and the RadWindow will stay on the page - just like any other dynamically created element on that page.

Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Madhu
Top achievements
Rank 1
Answers by
Sophy
Telerik team
Craig
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or