RadWindow Server side only

2 posts, 0 answers
  1. Subhash
    Subhash avatar
    2 posts
    Member since:
    Nov 2011

    Posted 19 Dec 2011 Link to this post

    Hi
    Here is what I am trying to do and was unsuccessful.

    The user clicks submit button. If there is already an order with the same ticket number I need to show a confirm window asking user if he/she is sure to submit with the same ticket number. If the user chooses to click on "No" button I do not do anything and ask user to correct the ticket number. If the user clicks on OK I need to redirect user to a different page.

    Any help appreciated.

    I tried using the RadConfrim method on the window manager but there is no way to get back to server sider after the OK button click. I tried to create a custom radwindow with content template but wasnt sure how to continue further.

    THanks
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 20 Dec 2011 Link to this post

    Hello,

    One suggestion is you can use RadAjaxManager to get back to server side. Here is the sample code.
    CS:
    protected void btnAlert_Click(object sender, EventArgs e)
       {
         RadWindowManager windowManager = FindControl(this, "WindowManager") as RadWindowManager;
         windowManager.RadConfirm("Server radconfirm: Are you sure?", "confirmCallBackFn", 330, 100, null, "Server RadConfirm");
      }

    JS:
    <script type="text/javascript">
    function confirmCallBackFn(arg)
     {
       var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
       ajaxManager.ajaxRequest();
     }
    </script>

    CS:
    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
       {
            // this will fire when you click on Ok/Cancel button
       }

    Thanks,
    Princy.
Back to Top