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

Multiple radconfirm dialog on a single page with different calls.

4 Answers 186 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rakesh
Top achievements
Rank 1
Rakesh asked on 05 Nov 2011, 01:52 AM
Hi,
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?

thanks

4 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 07 Nov 2011, 12:53 PM
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

OR

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);

OR

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,
Marin
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
0
Princy
Top achievements
Rank 2
answered on 07 Nov 2011, 02:02 PM
Hello Rakesh,

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

Thanks,
Princy.
0
Scott
Top achievements
Rank 1
answered on 09 May 2016, 02:40 PM

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

http://www.telerik.com/support/code-library/server-side-msgbox-user-control-for-radconfirm-radalert-and-radprompt


 

0
Marin Bratanov
Telerik team
answered on 10 May 2016, 06:49 AM

Hi Scott,

RadConfirm can be called via a built-in server method in RadWindowManager: http://demos.telerik.com/aspnet-ajax/window/examples/browserdialogboxes/defaultcs.aspx.

To use it in the code-behind logic, I advise you review the following help article: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/how-to/using-radconfirm-in-server-code.

To confirm client-side clicks on buttons (or other client-side actions), review the following demo: http://demos.telerik.com/aspnet-ajax/window/examples/confirmserverclicks/defaultcs.aspx. I advise you review its description in detail because it explains some important aspects of what can be done and how.

Regards,

Marin Bratanov
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Rakesh
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Princy
Top achievements
Rank 2
Scott
Top achievements
Rank 1
Share this question
or