TreeGrid initialization from JSON (plain format)

TreeGrid is initialized via script and populated from native json source

</> Source
<!DOCTYPE html>
<html>
<head>
	<title>TreeGrid initialization from JSON (plain format)</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>
	<script>
		var myTreeGrid;
		function doOnLoad() {
			myTreeGrid = new dhtmlXGridObject('gridbox');
			myTreeGrid.setImagePath("../../../codebase/imgs/");
			myTreeGrid.setHeader("Tree,Plain Text,Long Text,Color,Checkbox");
			myTreeGrid.setColumnIds("tree,title,name,price,date");
			myTreeGrid.setInitWidths("150,100,100,100,100");
			myTreeGrid.setColAlign("left,left,left,center,center");
			myTreeGrid.setColTypes("tree,ed,txt,ch,ch");
			myTreeGrid.setColSorting("str,str,str,na,str");
			myTreeGrid.enableAutoWidth(true);
			myTreeGrid.init();
			myTreeGrid.load("../common/data2.json", "js");
		}
	</script>
</head>
<body onload="doOnLoad();">
	<h1>TreeGrid initialization</h1>
	<p>TreeGrid is initialized via script and populated from native json source</p>
	<div id="gridbox" style="width:550px;height:250px;background-color:white;"></div></body>
</html>

Documentation

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