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

Close window by clicking the window

1 Answer 34 Views
Window
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 29 Nov 2011, 03:36 PM
How can I close a RadWindow bij clicking on the RadWindow?

Regards,
Marc

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Nov 2011, 05:04 AM
Hello,

Try the following JS by adding one button in ContentTemplate of RadWindow.
ASPX:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
  <Windows>
   <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true" >
    <ContentTemplate>
    <asp:Button ID="Button2" runat="server" Text="Close" OnClientClick="OnClientClick(); return false;" />
    </ContentTemplate>
   </telerik:RadWindow>
 </Windows>
</telerik:RadWindowManager>

JS:
<script type="text/javascript">
function OnClientClick()
 {
   var win = $find("<%=RadWindow1.ClientID%>");
   win.Close();
 }
</script>

-Shinu.
Tags
Window
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Shinu
Top achievements
Rank 2
Share this question
or