I did some search and looks like opening the radWindow is eash, just use "RadWindow1.VisibleOnPageLoad = True" on a button click will do the trick.
But closing the window is complicate. Why do I have to use javascript to close it? Is there an easier way to close it after postback?
But closing the window is complicate. Why do I have to use javascript to close it? Is there an easier way to close it after postback?
5 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 28 Dec 2010, 05:43 AM
Hello,
You could invoke a client method (which includes code for closing window) from code behind.
Checkout the following forum links for similar scenarios:
Close RadWindow From Server?
Closing RadWindow
Close RadWindow from RadWindow using server-side code
-Shinu.
You could invoke a client method (which includes code for closing window) from code behind.
Checkout the following forum links for similar scenarios:
Close RadWindow From Server?
Closing RadWindow
Close RadWindow from RadWindow using server-side code
-Shinu.
0
Hi wilson,
Svetlina
the Telerik team
The reason that the RadWindow should be closed from the server is that it is entirely created on the client, dynamically, by using lazy initialization. However, executing a script from the server is a general task which is not only used with RadControls but in general ASP.NET as well. I recommend to examine the following blog post we have prepared:
http://blogs.telerik.com/blogs/posts/09-05-05/executing_javascript_function_from_server-side_code.aspx
In case you face any problems, do not hesitate to contact us again with more details about the issue and we will do our best to help.
Svetlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

wilson
Top achievements
Rank 1
answered on 30 Dec 2010, 05:27 PM
Hi,
I am getting confused. Did you mean "The reason that the RadWindow should be closed from the server"? Then how come there is no service side method, like radWindow.close() to close the window?
I am getting confused. Did you mean "The reason that the RadWindow should be closed from the server"? Then how come there is no service side method, like radWindow.close() to close the window?
0

wilson
Top achievements
Rank 1
answered on 30 Dec 2010, 05:38 PM
Hi,
Also, I am using the rad window as a controls container.
So when user click on a button, I want to open the rad window. Then there is a close button in the rad window and user can click the button to close it.
I check your demo at: http://demos.telerik.com/aspnet-ajax/window/examples/internalcontent/defaultcs.aspx, but it keeps the rad window open on the page, so I can't really use it.
Also, I am using the rad window as a controls container.
So when user click on a button, I want to open the rad window. Then there is a close button in the rad window and user can click the button to close it.
I check your demo at: http://demos.telerik.com/aspnet-ajax/window/examples/internalcontent/defaultcs.aspx, but it keeps the rad window open on the page, so I can't really use it.
0
Hello wilson,
Svetlina
the Telerik team
For your convenience and to better illustrate what I meant I prepared and attached a sample page for you - please examine it and let me know how it goes.
All the best,Svetlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.