Function(treeId, treeNode)setting.callback.beforeRemove

Overview[ depends on jquery.ztree.exedit js ]

Specify callback function to be called before remove node, The return value controls the allow to remove node.

Default: null

Function Parameter Descriptions

treeIdString

zTree unique identifier: treeId.

treeNodeJSON

JSON data object of the node to be removed.

Return Boolean

return true or false

If return false, zTree will not remove node, and will not trigger the 'onRemove' callback.

Examples of setting & function

1. disable to remove node

function myBeforeRemove(treeId, treeNode) {
	return false;
}
var setting = {
	edit: {
		enable: true
	},
	callback: {
		beforeRemove: myBeforeRemove
	}
};
......