4 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 29 Apr 2009, 07:14 AM
Hi Edjia,
The hide() method makes the window invisible. I guess using close() method is better option for you because the window will be clossed and the OnClientClose() event will fire on executing close() method.
Here is the example which I tried.
.aspx
.javascript
Check-out the following link for important client side methods of RadWindow.
RadWindow Methods
-Princy
The hide() method makes the window invisible. I guess using close() method is better option for you because the window will be clossed and the OnClientClose() event will fire on executing close() method.
Here is the example which I tried.
.aspx
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"> |
<Windows> |
<telerik:RadWindow ID="RadWindow1" OnClientClose="OnClientClose" NavigateUrl="Dialog1.aspx" runat="server" VisibleOnPageLoad="true"> |
</telerik:RadWindow> |
</Windows> |
</telerik:RadWindowManager> |
<input id="Button1" type="button" value="hide" onclick="closeWindow();" /> |
.javascript
<script type="text/javascript"> |
function closeWindow() |
{ |
var oManager = GetRadWindowManager(); |
var window1 = oManager.getWindowByName("RadWindow1"); |
window1.close(); |
} |
function OnClientClose() |
{ |
alert('OnClientClose fired'); |
} |
</script> |
RadWindow Methods
-Princy
0

edjia
Top achievements
Rank 1
answered on 29 Apr 2009, 07:23 AM
the close method test is ok before i post this thread.
but i want to know why 2008q2 is ok
and 2009q1 is wrong.
but i want to know why 2008q2 is ok
and 2009q1 is wrong.
0
Hi Edjia,
Indeed, such behavior existed in previous version of the control but we changed that. Now OnClientClose is fired only when the window is closed.
Note that in case the DestroyOnClose property has value "false" (by default it is "false"), you can use the close() RadWindow's client side function instead of the hide() one. In this case both functions do the same thing.
All the best,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Indeed, such behavior existed in previous version of the control but we changed that. Now OnClientClose is fired only when the window is closed.
Note that in case the DestroyOnClose property has value "false" (by default it is "false"), you can use the close() RadWindow's client side function instead of the hide() one. In this case both functions do the same thing.
All the best,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

edjia
Top achievements
Rank 1
answered on 03 May 2009, 05:27 AM
thank you very much!