Stephane Zanoni
Top achievements
Rank 1
Stephane Zanoni
asked on 16 Apr 2008, 09:26 PM
Using the window.radopen() to return the window object and having it display is very limiting.
The problem is setting the size, status, title and all the options after the window has already been displayed.
Is there a way to get the object back in a hidden state, so the window can be initialized properly before displaying. Nothing in the docs seem to suggest this is possible.
Thanks.
The problem is setting the size, status, title and all the options after the window has already been displayed.
Is there a way to get the object back in a hidden state, so the window can be initialized properly before displaying. Nothing in the docs seem to suggest this is possible.
Thanks.
6 Answers, 1 is accepted
0
Hi Stephane,
You can use the ASP.NET AJAX $find() method to get a reference to the RadWindow on your page. This way you can call its client-side methods (setSize(), setStatus(), etc.) and after that - its show() method.
Kind regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You can use the ASP.NET AJAX $find() method to get a reference to the RadWindow on your page. This way you can call its client-side methods (setSize(), setStatus(), etc.) and after that - its show() method.
Kind regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Stephane Zanoni
Top achievements
Rank 1
answered on 17 Apr 2008, 02:05 PM
Unfortunately, I don't have pre-created windows laying around to use, all the windows are dynamically created when the users interacts with the environment.
Also, we have an unlimited number of windows that could be open so pre-creating 1 window and re-using it does not work.
Also, we have an unlimited number of windows that could be open so pre-creating 1 window and re-using it does not work.
0
Stephane Zanoni
Top achievements
Rank 1
answered on 20 Apr 2008, 02:10 AM
Any ideas??
0
Hello,
The RadWindow client object has a .clone() method. This means that you can create only one window, clone it a number of times and then set its properties on the client. After that, you can use the .show() method of the RadWindow client object to show the newly cloned window.
Kind regards,
Lini
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The RadWindow client object has a .clone() method. This means that you can create only one window, clone it a number of times and then set its properties on the client. After that, you can use the .show() method of the RadWindow client object to show the newly cloned window.
Kind regards,
Lini
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Stephane Zanoni
Top achievements
Rank 1
answered on 22 Apr 2008, 02:22 PM
That sounds good... I checked the demo and documentation, but I can't seem to find the javascript docs for the Window object.
Can you point me to it?
Can you point me to it?
0
Hello,
This is odd. Perhaps the property has not yet been added to the docs. Here is how you should use it:
First you need to have a base window in the RadWindowManager's collection. If you are not using a RadWindowManager control, I think that you only need the window control:
Next you can use the following JS code to open new windows:
For example:
openNewWindow("googleWindow", "http://www.google.com/");
The name parameter is what you can use to reference your window in the future and the url parameter is the window's navigateUrl property.
Greetings,
Lini
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
This is odd. Perhaps the property has not yet been added to the docs. Here is how you should use it:
First you need to have a base window in the RadWindowManager's collection. If you are not using a RadWindowManager control, I think that you only need the window control:
| <telerik:RadWindowManager id="RadWindowManager1" runat="Server"> |
| <Windows> |
| <telerik:RadWindow id="RadWindowBase" runat="server"></telerik:RadWindow> |
| </Windows> |
| </telerik:RadWindowManager> |
Next you can use the following JS code to open new windows:
| function openNewWindow(name, url) |
| { |
| var baseWindow = $find("<%= RadWindowBase.ClientID %>"); |
| var newWindow = $find(name); |
| if (null != newWindow) |
| { |
| //dispose old window; |
| newWindow.dispose(); |
| } |
| newWindow = baseWindow.clone(name); |
| //set properties here |
| newWindow.set_navigateUrl(url); |
| //show the new window |
| newWindow.show(); |
| } |
For example:
openNewWindow("googleWindow", "http://www.google.com/");
The name parameter is what you can use to reference your window in the future and the url parameter is the window's navigateUrl property.
Greetings,
Lini
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center