I have been thru these forums a lot and still haven't found a proper solution to show a delete confirmation from a RadToolbar. Do you have an example that works?
I have a toolbar with two buttons, "Add", "Delete".
I can get my javascript confirmation to load but even if it returns false, my "
EmployeeSummaryToolBar_ButtonClick" event fires off and executes the delete code.
Any help would be appreciated.
-------------------------------------------------------------------------------------------------------
Add to toolbar "OnClientButtonClicking="confirmation"
Javascript:
function confirmation(sender, args) {
var button = args.get_item();
if (button.get_commandName() == "Delete") {
var message = "blah blah";
args.set_cancel(!confirm(message));
}
}
in c# file..
protected void ToolBar_ButtonClick(object sender, RadToolBarEventArgs e)
{
String commandName = ((RadToolBarButton)e.Item).CommandName.ToLower();
if (commandName.Equals("delete"))
{
Deletefunction(your_args);
}
}