Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Brent Northey on May 22, 2008 15:27
open dhtmlx forum
Cannot get treegrid lines to draw in treegrid

Hello,

I am unable to get the tree lines to draw for my tree. My code is below, I made sure I included the dhtmlxtreegrid_lines.js file.

I am getting "This Object does not support this property or method" when it trys to draw initially. If I comment out mygrid.enableTreeLines(true); it works fine.

Any help would be greatly appreciated.

Thanks,
Brent Northey


Code Below:

<html>
<head>
    <title> sandbox </title>
        <link rel="STYLESHEET" type="text/css" href="../../../dhtmlxGrid/codebase/dhtmlxgrid.css">
        <link rel="STYLESHEET" type="text/css" href="../../../dhtmlxGrid/codebase/dhtmlxgrid_skins.css">
        <script src="../../../dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
        <script src="../../../dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
        <script src="../../../dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
        <script src="../../codebase/ext/dhtmlxtreegrid_lines.js"></script>
        <script src="../../codebase/dhtmlxtreegrid.js"></script>
</head>
<body>

<div id="gridbox" width="575px" height="200px" style="background-color:white;overflow:hidden"></div>
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.selMultiRows = false;
mygrid.imgURL = "../../../dhtmlxGrid/codebase/imgs/icons_greenfolders/";
mygrid.setHeader("Delete,Select,Tree,Date");
mygrid.setInitWidths("25,50,300,200");
mygrid.setColAlign("center,center,left,left");
mygrid.setColTypes("img,ch,tree,ro");
mygrid.setColSorting("na,na,str,date");
mygrid.enableTreeCellEdit(false); // Makes labels on tree read only


//mygrid.enableTreeLines(true); <----------------------------------- KEEPS FAILING

             mygrid.init();
mygrid.loadXML("test_list_1B.xml");</script>
</body>
</html>
Answer posted by Support on May 23, 2008 02:52

Please be sure that 

     codebase/ext/dhtmlxtreegrid_lines.js 

included in your html page, this file necessary to enable lines in treegrid.