Hello,
I’m having a problem with a dhtmlx tree grid. I have successfully implemented a treegrid on one page in my application used for editing data, now I want to simply display the data on another page, so I copied the javascript and div and the javascript and css file imports.
However, I’m getting a space about 4px high above my header as shown in the screenshot. No idea where it is coming from. Can someone please tell me?
The div, nested in a table cell:
<tr>
<td colspan="2">
<h5>Prerequisites</h5>
<s:hidden id="prerequisiteXML" name="prerequisiteXML" />
<div id="prereqs_div" style="width:480px;height:500px;" style="background-color: white;"></div>
</td>
</tr>
Init script at the end of my page:
prereqsGrid = new dhtmlXGridObject('prereqs_div');
prereqsGrid.imgURL = contextPath+"/include/dhtmlx/codebase/imgs/icons_greenfolders/";
prereqsGrid.setHeader("Course,Start Date,End Date");
prereqsGrid.setInitWidths("300,80,80");
prereqsGrid.setColAlign("left,center,center");
prereqsGrid.setColTypes("tree,ro,ro");
prereqsGrid.setDateFormat("%Y-%m-%d");
prereqsGrid.init();
prereqsGrid.enableAutoHeight(true, 500);
prereqsGrid.enableDistributedParsing(true, 10, 500);
prereqsGrid.setSkin("dhx_skyblue");
prereqsGrid.loadXMLString(document.getElementById("prerequisiteXML").value);
prereqsGrid.enableTreeCellEdit(false);
prereqsGrid.expandAll(true);
My imports:
<link rel="stylesheet" type="text/css"
href="<xss:absoluteLink>/include/style_display.css</xss:absoluteLink>" />
<link rel="stylesheet" type="text/css"
href="<xss:absoluteLink>/include/dhtmlx/codebase/dhtmlxgrid.css</xss:absoluteLink>">
<link rel="stylesheet" type="text/css"
href="<xss:absoluteLink>/include/dhtmlx/codebase/skins/dhtmlxgrid_dhx_skyblue.css</xss:absoluteLink>">
<script>window.dhx_globalImgPath = contextPath+"/include/dhtmlx/codebase/imgs/";</script>
<script src="<xss:absoluteLink>/include/dhtmlx/codebase/dhtmlxcommon.js</xss:absoluteLink>"></script>
<script src="<xss:absoluteLink>/include/dhtmlx/codebase/dhtmlxgrid.js</xss:absoluteLink>"></script>
<script src="<xss:absoluteLink>/include/dhtmlx/codebase/dhtmlxgridcell.js</xss:absoluteLink>"></script>
<script src="<xss:absoluteLink>/include/dhtmlx/codebase/dhtmlxtreegrid.js</xss:absoluteLink>"></script>
<script src="<xss:absoluteLink>/include/dhtmlx/codebase/ext/dhtmlxgrid_srnd.js</xss:absoluteLink>"></script>
<script src="<xss:absoluteLink>/include/dhtmlx/codebase/ext/dhtmlxgrid_filter.js</xss:absoluteLink>"></script>
<script src="<xss:absoluteLink>/include/dhtmlx/codebase/ext/dhtmlxtreegrid_filter.js</xss:absoluteLink>"></script>
<script src="<xss:absoluteLink>/include/dhtmlx/codebase/ext/dhtmlxgrid_splt.js</xss:absoluteLink>"></script>