Hi Cosimo,
Thank you for contacting Syncfusion support
We have analyzed your requirement. We can disable the custom menu item by using disable property. Please refer the below code snippet.
|
<script type="text/javascript">
function contextMenuOpen(args) {
var contextMenuItems = [{
headerText: "Top",
eventHandler: customMenuAddHandler,
menuId: "Top",
parentMenuId: "Add",
iconClass: "e-topIcon",
disable: true
}, {
headerText: "Bottom",
menuId: "Bottom",
parentMenuId: "Add",
eventHandler: customMenuAddHandler,
iconClass: "e-bottomIcon",
disable: true
},
];
args.contextMenuItems.push.apply(args.contextMenuItems, contextMenuItems);
}
}
</script> |
We have prepared the JS Playground for your reference, please find the sample link below
Please let us know if you require further assistance on this.
Regards,
Punniyamoorthi