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

Radconfirm on telerik button click.

1 Answer 57 Views
Button
This is a migrated thread and some comments may be shown as answers.
Katya
Top achievements
Rank 1
Katya asked on 17 Jul 2013, 08:43 AM
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.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 17 Jul 2013, 09:51 AM
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.
Tags
Button
Asked by
Katya
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or