Confirm Radwindow close

2 posts, 0 answers
  1. JC
    JC avatar
    30 posts
    Member since:
    Feb 2013

    Posted 13 May 2013 Link to this post

    Hi Telerik,

    Using the standard browser dialog Is it possible to display a confirm dialog when closing the Radwindow?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 May 2013 Link to this post

    Hi JC,

    Please have a look at the following code I tried which works fine at my end.

    <telerik:RadButton ID="RadButton1" runat="server" AutoPostBack="false" Text="Open RadWindow"
    <telerik:RadWindow ID="RadWindow1" runat="server" OnClientBeforeClose="OnClientBeforeClose">
            <telerik:RadDatePicker ID="RadDatePicker1" runat="server">

    <script type="text/javascript">
        function OnClientClicked(sender, args) {
            var RadWindow1 = $find('<%=RadWindow1.ClientID %>');
        function OnClientBeforeClose(sender, args) {
            args.set_cancel(!confirm("Are you sure you want to close this window"));

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top