I'm migrating several radmenu functions into a radribbonbar. I have a scenario where I use a radconfirm to intercept a menuclick. It appears that the ribbonbar doesn't support the .click() method for the buttons. I could use a javascript confirm, then a .set_cancel() method but I want to use the radconfim if possible.
sample scripts:
sample scripts:
var btnclickCalledAfterRadconfirm = false;var RRB_lastClickedItem = null;function btn_confirmCallbackFunction(args) { alert('debug 1'); if (args) { btnclickCalledAfterRadconfirm = true; alert('debug 2'); // this works if this was a radmenuitem object RRB_lastClickedItem.click(); -- alert('debug 3'); } else btnclickCalledAfterRadconfirm = false; RRB_lastClickedItem = null; } function RRB_Btn_OnClientItemClickingHandler(sender, eventArgs) { if (!btnclickCalledAfterRadconfirm) { RRB_lastClickedItem = eventArgs.get_button(); var myText = RRB_lastClickedItem.get_text(); //alert('debug: ' + myText); if (myText == 'Clear All') { eventArgs.set_cancel(true); radconfirm("Clear all Alarms?", btn_confirmCallbackFunction); } if (myText == 'Delete All') { eventArgs.set_cancel(true); radconfirm("Delete all Alarms?", btn_confirmCallbackFunction); } if (myText == 'Acknowledge All') { eventArgs.set_cancel(true); radconfirm("Acknowledge all Alarms?", btn_confirmCallbackFunction); } if (myText == 'Clear') { eventArgs.set_cancel(true); radconfirm("Clear selected Alarms?", btn_confirmCallbackFunction); } if (myText == 'Delete') { eventArgs.set_cancel(true); radconfirm("Delete selected Alarms?", btn_confirmCallbackFunction); } if (myText == 'Refresh') { //alert('refresh'); eventArgs.set_cancel(true); $find("<%= RadAjaxManager1.ClientID %>").ajaxRequestWithTarget('<%= lbHiddenRefresh.UniqueID %>', ''); } } btnclickCalledAfterRadconfirm = false; }