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

example for messagebox which stops the code behind thread

5 Answers 153 Views
Window
This is a migrated thread and some comments may be shown as answers.
Baris
Top achievements
Rank 1
Baris asked on 11 Mar 2014, 12:12 PM
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            <Windows>
                <telerik:RadWindow ID="modalPopup" runat="server" Width="360px" Height="360px" Modal="true" Behaviors="Close"   >
                    <ContentTemplate>
                        <div >
                            <table cellspacing="0" cellpadding="0" class="info" width="100%">
                                <tr>
                                    <td align="center" valign="middle" height="175">Pages are about to exit, do you want to save?
                                    </td>
                                </tr>
                            </table>
                            <div class="bottom-buttons cf">
                                <div class="fr">
                                    <a href="#" class="button cancel">Cancel</a>
                                    <a href="#" class="button button-pink">Save</a>
                                </div>
                            </div>
                        </div>
                        <asp:Button ID="Button2" runat="server" Text="Button" />
                    </ContentTemplate>
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>

But In this radwindow, I can be show it in page but I need when this pop is shown at sth in codebehind, code behind must be stop and must wait pop up result. In this radwindow message box shown but code is resuming. I need a message box like      asp messagebox.show("sth"); because I need to wait pop up result. Can you give me example like that ? Note: messagebox must inculde item template property.


5 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 11 Mar 2014, 01:35 PM
Hello,

This help article explains how to achieve this and what must be kept in mind in the process: http://www.telerik.com/help/aspnet-ajax/window-using-radconfirm-in-server-code.html.


Regards,
Marin Bratanov
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

0
Baris
Top achievements
Rank 1
answered on 12 Mar 2014, 03:21 PM
When ı used radconfirm  code isn't stop at codebehind. Dialog must be open and must wait a result in code. Also I need take result at code behind not js. Can you write a example for me
0
Raman
Top achievements
Rank 1
answered on 13 Mar 2014, 07:06 AM
Hello Baris

Is your problem solved... if solved can you please explain how u have done this.
0
Baris
Top achievements
Rank 1
answered on 13 Mar 2014, 08:10 AM
No I can't find solution for this. If I find, I will share with u.
0
Princy
Top achievements
Rank 2
answered on 13 Mar 2014, 10:16 AM
Hi Baris,

Unlike regular browser counterpart, the RadConfirm dialog is non-blocking,it's designed to respond via a callback. At a minimum the RadConfirm function takes two arguments, one HTML string with the message, and the name of a callback function that deals with the results. The callback takes a single parameter, whose value is True or False, depending on whether the user clicks "OK" or "Cancel". The RadConfirm returns the client result as an argument in its Callback function only, as opposed to the standard browser confirm() function - the radconfirm() function returns a reference to the RadWindow dialog that is created and not the result. The callback function is a client-side JavaScript function which is executed when the dialog is closed. Please have a look into the this help documentation  for further information.

Thanks,
Princy.
Tags
Window
Asked by
Baris
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Baris
Top achievements
Rank 1
Raman
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or