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

How to get radDialog Confirm Result

3 Answers 115 Views
Window
This is a migrated thread and some comments may be shown as answers.
ALEX
Top achievements
Rank 1
ALEX asked on 19 Apr 2011, 09:22 AM
Hi Expert,

             I want to get radDialog confirm result. I don't know how can i get it. I follow the site example, but before return result my button command is already fired it. i want to repalce below code with radDialog Confirm. Kindly, please advice to me.

<asp:ImageButton ID="_imgbtnNew" OnCommand="_imgbtnNew_Command" runat="server" ImageUrl="~/site_images/new.png"
ImageAlign="AbsMiddle" Height="15px" OnClientClick="javascript:return confirm('Are you sure?');" ></asp:ImageButton>


Best Regards,

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Apr 2011, 10:36 AM
Hello Alex,

Unlike the standard confim(), radconfirm() cannot block the execution of the thread and it needs a CallBackFunction. So once the user confirms the postback, in the radconfirm's CallBackFunction you need to use  __doPostBack to call server side event. I believe the following Code Library will be of help in achieving this functionality;
Using radconfirm() CallBackFunction to perform a postback

You can also refer to the following code library submission inorder to allow the radconfirm window to simulate the blocking of the execution thread while waiting for user's confirmation:
Block the execution thread with radconfirm

The predefined dialogs (radalert, radconfirm and radprompt) can be now called by using the new server methods RadAlert, RadConfirm  and RadPrompt of the RadWindowManager
So I recommend you to use this simple approach to block the execution thread with radconfirm.

Take a look at the following demo.
Window / Alert, Prompt, Confirm


Thanks,
Princy.
0
ALEX
Top achievements
Rank 1
answered on 24 Apr 2011, 08:22 AM
Hi Princy,

             Thank for your reply. Kindly, please let try again. i will let you know my result.

Best Regards,
0
ALEX
Top achievements
Rank 1
answered on 25 Apr 2011, 05:46 AM
Hi Princy,

           Thanks for your help! It work for me.

Best Regards,
Tags
Window
Asked by
ALEX
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
ALEX
Top achievements
Rank 1
Share this question
or