Refreshing Items

Delete Selected Node
Set selected Node Lable to

Refresh Item and the entire tree from server

These operations get tree structure (of the entire tree or starting from the specified level) from server to syncronize client and server nodes.
Refresh selected Item
Refresh root (Entire tree)

Refresh Item in the smart mode

Refreshing items in the smart mode keeps opened and selected items state when it is possible.
Refresh selected Item (smart mode)
</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
	<title> Refreshing Items</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.enableDragAndDrop(true);
			myTree.setXMLAutoLoadingBehaviour("id");
			myTree.setChildCalcMode("child");
			myTree.setXMLAutoLoading("php/xml.php");
			myTree.enableSmartXMLParsing(true);
			myTree.load("php/xml.php");
		}
	</script>
</head>
<body onLoad="doOnLoad()">
	<h1>Refreshing Items</h1>
	<div id="treeboxbox_tree" class="tree_demo_samples"></div>
	<div style="height:60px;">
		<a href="#" onClick="myTree.deleteItem(myTree.getSelectedItemId(),true)">Delete</a> Selected Node<br>
		<a href="#" onClick="myTree.setItemText(myTree.getSelectedItemId(),document.getElementById('newlabel').value)">Set</a> selected Node Lable to <input id="newlabel">
	</div>
	<div>
		<p>Refresh Item and the entire tree from server</p>
			These operations get tree structure (of the entire tree or starting from the specified level)
			from server to syncronize client and server nodes.<br>
		<a  href="javascript:void(0)" onClick="myTree.refreshItem(myTree.getSelectedItemId())">Refresh selected Item</a><br>
		<a  href="javascript:void(0)" onClick="myTree.refreshItem(0)">Refresh root (Entire tree)</a>
	</div>
	<p>Refresh Item in the smart mode</p>
		Refreshing items in the smart mode keeps opened and selected items state when it is possible.<br>
	<a  href="javascript:void(0)" onClick="myTree.smartRefreshItem(myTree.getSelectedItemId())">Refresh selected Item (smart mode)</a>
</body>
</html>

Documentation

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