Close window by clicking the window

2 posts, 0 answers
  1. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 29 Nov 2011 Link to this post

    How can I close a RadWindow bij clicking on the RadWindow?

    Regards,
    Marc
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Nov 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top