Multiselection

When the multiselection functionality is enabled you can select multiple items using Ctrl-click.
Drag and drop is also supported in the multiselection mode.
Cut and Paste functionality is available as well. Check it out!

Enable Multiselection
Enable Strict Multiselection
Disable Multiselection

Cut
Paste
</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
	<title> Multiselection</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/tree3_14_selection_sorting_navigation.xml")
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Multiselection</h1>
	<p>When the multiselection functionality is enabled you can select multiple items using Ctrl-click. <br/>
		Drag and drop is also supported in the multiselection mode.<br/>
		Cut and Paste functionality is available as well. Check it out!</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.enableMultiselection(true);">Enable Multiselection</a><br>
				<a href="#" onClick="myTree.enableMultiselection(true,true);">Enable Strict Multiselection</a><br>
				<a href="#" onClick="myTree.enableMultiselection(false);">Disable Multiselection</a><br><hr/>
				<a href="#" onClick="myTree.doCut();">Cut</a><br>
				<a href="#" onClick="myTree.doPaste(myTree.getSelectedItemId());">Paste</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.