Grid linked to tree
Tree can be used as editor for the grid. Try to edit column with authors.
</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
<title>Grid linked to tree</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>
<style>
.containerTableStyle {
overflow: auto;
position: relative;
top: 0;
font-size: 12px;
border: 1px solid #333;
background: #fff;
}
</style>
<script>
var myGrid, myTree;
function doOnLoad(){
myTree = new dhtmlXTreeObject("treeboxbox_tree","250px","250px",0);
myTree.setImagePath("../../../skins/web/imgs/dhxtree_web/");
myTree.load("../common/tree.xml",function(){
myGrid = new dhtmlXGridObject('gridbox');
myGrid.setImagePath("../../../codebase/imgs/");
myGrid.setHeader("Sales, Book Title, Author,Price,In Store,Shipping,Bestseller,Date of Publication");
myGrid.setInitWidths("70,150,100,80,80,80,80,100");
myGrid.setColAlign("right,left,left,right,center,left,center,center");
myGrid.setColTypes("dyn,ed,stree,price,ch,co,ra,ro");
myGrid.setSubTree(myTree,2,0);
myGrid.enableAutoWidth(true);
myGrid.enableAutoHeight(true);
myGrid.init();
myGrid.load("../common/linked_grid.xml");
});
}
</script>
</head>
<body onload="doOnLoad()">
<h1>Grid linked to tree</h1>
<p>Tree can be used as editor for the grid. Try to edit column with authors.</p>
<div id="gridbox" style="width:750px; height:350px; background-color:white;"></div>
<div id="treeboxbox_tree" style="width:252px;height:260px"></div>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.