Lists of check boxes states

The following methods allow you to get lists reflecting the check boxes states (checked, unchecked, partially checked), moreover you can get a list of checked branches (some sub-items are checked).



Get list of checked

Get list of unchecked

Get list of partially checked

Get list of checked branches

</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
	<title>Lists of check boxes states</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.enableCheckBoxes(1);
			myTree.enableThreeStateCheckboxes(true); 
			myTree.enableSmartXMLParsing(true);
			myTree.load("../common/tree_cl.xml");
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Lists of check boxes states</h1>
	<p> The following methods allow you to get lists reflecting the check boxes states (checked, unchecked, partially checked), moreover you can get a list of checked branches (some sub-items are checked).</p>
	<table>
		<tr>
			<td valign="top">
				<div id="treeboxbox_tree" class="tree_demo_samples"></div>
			</td>
			<td style="padding-left:25px" valign="top">
				<br><br>
				<a href="javascript:void(0);" onClick="alert(myTree.getAllChecked());">Get list of checked</a><br><br>
				<a href="javascript:void(0);" onClick="alert(myTree.getAllUnchecked());">Get list of unchecked</a><br><br>
				<a href="javascript:void(0);" onClick="alert(myTree.getAllPartiallyChecked());">Get list of partially checked</a><br><br>
				<a href="javascript:void(0);" onClick="alert(myTree.getAllCheckedBranches());">Get list of checked branches</a><br><br>
			</td>
		</tr>
	</table>
</body>
</html>

Documentation

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