|
@Html.EJS().TreeView("tree").ExpandOn(Syncfusion.EJ2.Navigations.ExpandOnSettings.Click).NodeClicked("onNodeClicked").Fields(ViewBag.TreeViewFields).Render() |
|
@Html.EJS().TreeView("tree").ExpandOn(Syncfusion.EJ2.Navigations.ExpandOnSettings.Click).NodeExpanding("onNodeExpanding").Fields(ViewBag.TreeViewFields).Render() |
|
function onNodeExpanding(args) {
//Blocked the expand option for below mentioned id nodes
var blockedNodesID = ["01", "02", "04"];
var target = args.event.originalEvent.target;
if (blockedNodesID.indexOf(args.nodeData.id) > -1 && target.classList.contains("e-fullrow")) {
args.cancel = true;
}
} |