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
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
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.
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
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,
Telerik