Multiple radconfirm dialog on a single page with different calls.

5 posts, 0 answers
  1. Rakesh
    Rakesh avatar
    1 posts
    Member since:
    Nov 2011

    Posted 04 Nov 2011 Link to this post

    I am using radconfirm dialog box to show a confirmation if user wants to remove the records with OK button and cancel link.
    Now I am trying to implement radconfirm dialog box to show a confirmation to user when he click on open button; then a confirmation popup should open which will say "Hey, do you want to save it". it will have 2 buttons - yes, no. here cancel link will not come.

    Please suggest How I can implement 2 radconfirm on single page or I can reuse the existing radconfirm dialog box and how?

  2. Marin Bratanov
    Marin Bratanov avatar
    5934 posts

    Posted 07 Nov 2011 Link to this post

    Hi Rakesh,

    I can suggest several options to achieve your scenario:

    1) Create a RadWindow that will have the proper styling (modal, only close behavior enabled, etc) and in its ContentTemplate you can place buttons and content as you desire, then open it instead of the RadConfirm. This allows you to have directly server-side handlers for the button clicks


    2) add a second RadWindowManager at the end of the form and modify its ConfirmTemplate. THen if you need the second type of confirm box call it explicitly from this manager, i.e.:
    var secondMngr = $find("secondManagerClientID");
    secondMngr.radconfirm("sure?", secondCallBackFn);


    3) Change the text via JavaScript, for example: var oConfirm = radconfirm("sure", null);
    $telerik.$(".rwInnerSpan", oConfirm.get_popupElement())[1].innerHTML = "my Text";

    4) Change the string via the localization, as shown in this kb article before calling the confirm dialog. Note that this is a global setting.

    Best wishes,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 07 Nov 2011 Link to this post

    Hello Rakesh,

    You can try the following method as well with some javaScript.
    var oAlert = radalert("test");
    var alertOKbtn = $telerik.getElementByClassName(oAlert.get_contentElement(), "rwInnerSpan", "span");
    alertOKbtn.innerHTML = "OKTextAlert";
    var oConfirm = radconfirm("test");
    var confirmOKbtn = $telerik.getElementByClassName(oConfirm.get_contentElement(), "rwInnerSpan", "span");
    confirmOKbtn.innerHTML = "OKTextConfirm";

  4. Scott
    Scott avatar
    1 posts
    Member since:
    Mar 2016

    Posted 09 May 2016 Link to this post

    does anyone have a C# controls to help with Radconfrim communication with the Code Behind as in :

    Server Side MsgBox User Control for radconfirm, radalert and radprompt


  5. Marin Bratanov
    Marin Bratanov avatar
    5934 posts

    Posted 10 May 2016 Link to this post

    Hi Scott,

    RadConfirm can be called via a built-in server method in RadWindowManager:

    To use it in the code-behind logic, I advise you review the following help article:

    To confirm client-side clicks on buttons (or other client-side actions), review the following demo: I advise you review its description in detail because it explains some important aspects of what can be done and how.


    Marin Bratanov
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top