RadConfirm user click

2 posts, 0 answers
  1. Damian
    Damian avatar
    21 posts
    Member since:
    Mar 2013

    Posted 31 Jul 2013 Link to this post

    Hi Telerik

    I am using RadConfirm dialog in my asp.net web form to get the user confirmations. Since the user can click OK or cancel and there is a third possibility that he can click the X button to close. Therefore how to differentiate between these user interactions?

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

    Posted 31 Jul 2013 Link to this post

    Hi Damian,

    You can use the Callback function of the RadConfirm to check if the user has pressed OK/Cancel or whether he has closed the dialog. Please have a look at the following JavaScript I tried which works fine at my end. The argument of the Callback function returns null if the user directly closes the RadConfirm.

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <telerik:RadButton ID="RadButton1" runat="server" Text="Delete" OnClientClicking="confirmDelete">

    <script type="text/javascript">
        function confirmDelete(sender, args) {
            radconfirm("Are you sure you want to Delete?", callbackFunction)
        function callbackFunction(arg) {
            if (arg == null) {
                alert("RadConfirm is closed");
            else if (arg == true) {
                alert("User Clicked OK");
            else {
                alert("User Clicked Cancel");

Back to Top