I have a RadTreeView (RadControls Ajax Q1 2008 1.415) with ContextMenu. When I click an item in the ContextMenu called "Delete", I want to show a confirm messagebox. What happens now is that it run a postback no matter what (the ContextMenu item has PostBack=true), but I want to stop this if the user clicks "Cancel" in the confirm messagebox.
Here is my javascript function (called from OnClientContextMenuItemClicked):
Anyone with a solution?
Here is my javascript function (called from OnClientContextMenuItemClicked):
function onClientContextMenuItemClicked(sender, args) |
{ |
var menuItem = args.get_menuItem(); |
var treeNode = args.get_node(); |
switch(menuItem.get_value()) |
{ |
case "Edit": |
break; |
case "Delete": |
return confirm('Are you sure?'); |
break; |
} |
} |