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

Close a radwindow from within itself

3 Answers 150 Views
Window
This is a migrated thread and some comments may be shown as answers.
IrishManInUSA
Top achievements
Rank 1
IrishManInUSA asked on 15 Jul 2008, 06:58 PM
I have a form that opens up a dialog which will allow the user to do some things, and once they are done, they can click on a button and the window will close.

Well, it is suppose to close, but I have gotten it to close yet. So I was wondering how you would go about doing that?

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 16 Jul 2008, 05:27 AM
Hello John Daly,

In general, you need to get a reference to the content page's wrapper - e.g. the RadWindow that shows the content page, and then to call its close() method.

More information on the subject and a code sample is available in the following help article: Using RadWindow as a Dialog.

I hope this helps.


Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Paulo
Top achievements
Rank 2
answered on 19 Apr 2009, 05:19 PM
Path to the example is not working. I have the same problem
0
Princy
Top achievements
Rank 2
answered on 20 Apr 2009, 05:40 AM
Hello Paulo,

Try the following client side code for clossing RadWindow onclicking the button which is placed in the dialog window.

Dialog Page:
[ASPX]
 
<input id="Button1" type="button" value="Close the window" onclick="coseWindow();" /> 

[JavaScript]
 
<script type="text/javascript">  
function coseWindow()  
{  
    var oWindow = GetRadWindow();  
    oWindow.close();  
}  
function GetRadWindow()  //To get a reference to the RadWindow object   
{  
  var oWindow = null;  
  if (window.radWindow)  
     oWindow = window.radWindow;  
  else if (window.frameElement.radWindow)  
     oWindow = window.frameElement.radWindow;  
  return oWindow;  
}    
</script> 
Using RadWindow as a Dialog

Thanks,
Princy.
Tags
Window
Asked by
IrishManInUSA
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Paulo
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Share this question
or