Disable drop target checking

After disabling drop check, item can be dropped everywhere, even on itself. (to prevent error user must add own code to control drag and drop)
If drop check enabled (default behavior) item can't be dropped on itself, or on any from its children.

Enable drop target checking
Disable drop target checking
</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
	<title> Disable drop target checking</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<link rel="stylesheet" type="text/css" href="../common/demo_style.css"/>
	<script>
		var myTree;
		function doOnLoad(){
			myTree = new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
			myTree.setImagePath("../../../skins/web/imgs/dhxtree_web/");
			myTree.enableSmartXMLParsing(true);
			myTree.enableDragAndDrop(true);
			myTree.load("../common/tree_05_drag_n_drop.xml")
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Disable drop target checking</h1>
	<p>After disabling drop check, item can be dropped everywhere, even on itself. (to prevent error user must add own code to control drag and drop)
		<br/>If drop check enabled (default behavior) item can't be dropped on itself, or on any from its children.
	</p>
	<table>
		<tr>
			<td>
				<div id="treeboxbox_tree" class="tree_demo_samples"></div>
			</td>
			<td rowspan="2" style="padding-left:25px" valign="top">
				<a href="#" onclick="myTree.disableDropCheck(false);">Enable drop target checking</a><br>
				<a href="#" onclick="myTree.disableDropCheck(true);">Disable drop target checking</a><br>
			</td>
		</tr>
		<tr>
			<td>
			</td>
		</tr>
	</table>
</body>
</html>

Documentation

Check documentation to learn how to use the components and easily implement them in your applications.