I'm trying to figure out to I can show the generic radConfirm with "Yes" or "No" buttons instead of "OK" and "Cancel" buttons and have a post back occur when either "yes" or "no" occur to a different button. Right now I'm invoking radConfirm server-side using this
code behind c#
ShowConfirm("Are you sure that you want to use special option?", ConfirmPerformActionButton.UniqueID);
private void ShowConfirm(string dialogText, string postBackUrl)
{
string script = string.Format("showConfirm(\"{0}\",\"{1}\");", dialogText, postBackUrl); ;
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "KEY", script, true);
}
on the ascx i have
<script type="text/javascript">
var confirmPostBackUrl;
function showConfirm(dialogText, postBackUrl) {
function f() {
confirmPostBackUrl = postBackUrl;
Sys.Application.remove_load(f);
radconfirm(dialogText, confirmCallback);
}
Sys.Application.add_load(f);
}
function confirmCallback(arg) {
if (arg) {
__doPostBack(confirmPostBackUrl, '');
}
}
</script>
on master page i have
<telerik:RadWindowManager ID="MasterRadWindowManager" runat="server">
</telerik:RadWindowManager>
thanks for any suggestions!