Hi Team,
I am using a tree view . When user will right click on any of the node he can able to add a child node . But fore that I want to display a confirmation message . If he/she confirms then only he can able to add a new child node . For this I have written the bellow mentioned code . It is working for when user is confirms but it not working when user not confirming it . It is giving error at
"args.set_cancel(true);" . Can you please help me out .
function
onClientContextMenuItemClicked(sender, args)
{
var menuItem = args.get_menuItem();
var treeNode = args.get_node();
if (!confirm("Do you really want to add a new value. ? "))
{
args.set_cancel(
true);
}
else
{
switch(menuItem.get_value())
{
case "NewValue":
break;
}
}
}
With Regards
Manoj