DHTMLX Docs & Samples Explorer

Views

Source
<link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxlayout.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxlayout_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxlayout.js"></script>
<link rel="stylesheet" type="text/css" href="../../../dhtmlxGrid/codebase/dhtmlxgrid.css">
<link rel="stylesheet" type="text/css" href="../../../dhtmlxGrid/codebase/skins/dhtmlxgrid_dhx_skyblue.css">
<script src="../../../dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script src="../../../dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
<link rel="stylesheet" type="text/css" href="../../../dhtmlxTree/codebase/dhtmlxtree.css">
<script src="../../../dhtmlxTree/codebase/dhtmlxtree.js"></script>
<script src="../../codebase/dhtmlxcontainer.js"></script>
 
<div id="parentId" style="position: relative; top: 20px; left: 20px; width: 600px; height: 400px; aborder: #B5CDE4 1px solid;"></div>
<div style="margin-top: 100px;">
    <input type="button" value="Grid" onclick='dhxLayout.cells("a").view("def").setActive();'>
    <input type="button" value="Tree" onclick='dhxLayout.cells("a").view("tree").setActive();'>
</div>
<script>
var dhxLayout,
dhxGrid,
dhxTree;
function doOnLoad() {
    dhxLayout = new dhtmlXLayoutObject("parentId", "3L");
    dhxGrid = dhxLayout.cells("a").attachGrid();
    dhxGrid.setImagePath("../../../dhtmlxGrid/codebase/imgs/");
    dhxGrid.loadXML("../common/grid.xml?etc=" + new Date().getTime());
    dhxTree = dhxLayout.cells("a").view("tree").attachTree();
    dhxTree.setImagePath("../../../dhtmlxTree/codebase/imgs/csh_vista/");
    dhxTree.loadXML("../common/tree.xml?etc=" + new Date().getTime());
}
</script>