Radconfirm on telerik button click.

2 posts, 0 answers
  1. Katya
    Katya avatar
    21 posts
    Member since:
    May 2013

    Posted 17 Jul 2013 Link to this post

    Hi

    I came across the RadConfirm and now I want to change the asp confirm box shown on my radbutton click to radconfirm. I added args.set_cancel(!radconfirm("Confirm Delete?") but ended in some sort of error. Didnt get what the issue. So please point me in the right direction to get it done.

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

    Posted 17 Jul 2013 Link to this post

    Hi Katya,

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

    ASPX:
    <telerik:RadButton ID="RadButton1" runat="server" Text="Click" OnClientClicking="confirmClick"
        OnClick="RadButton1_Click">
    </telerik:RadButton>

    JavaScript:
    <script type="text/javascript">
        function confirmClick(sender, args) {
            function callBackFunction(arg) {
                if (arg == true) {
                    $find("<%=RadButton1.ClientID %>").click();
                }
            }
            radconfirm("Are you sure?", callBackFunction, 300, 160, null, "RadConfirm");
            args.set_cancel(true);
        }
    </script>

    Please note that for the RadConfirm to work, there should be a RadWindowManager on the page.

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