Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Renu on Aug 27, 2009 02:42
open dhtmlx forum
DhtmlXtreeGrid

<link rel="STYLESHEET" type="text/css" href="<%=UIAttributes.APP_PATH%>/web/css/dhtmlxgrid.css">
<script src="<%=UIAttributes.APP_PATH%>/web/common/dhtmlxcommon.js"></script>
<script src="<%=UIAttributes.APP_PATH%>/web/common/dhtmlxgrid.js"></script>
<script src="<%=UIAttributes.APP_PATH%>/web/common/dhtmlxgridcell.js"></script>
<script src="<%=UIAttributes.APP_PATH%>/web/common/dhtmlxgrid_nxml.js"></script>
<script src="<%=UIAttributes.APP_PATH%>/web/common/dhtmlxgrid_excell_link.js"></script>
<script src="<%=UIAttributes.APP_PATH%>/web/common/dhtmlxtreegrid.js"></script>
<script src="<%=UIAttributes.APP_PATH%>/web/common/dhtmlxtree_start.js"></script>
<script src="<%=UIAttributes.APP_PATH%>/web/common/dhtmlxtree.js"></script>
<script src="<%=UIAttributes.APP_PATH%>/web/common/dhtmlxtreegrid_lines.js"></script>
<script src="<%=UIAttributes.APP_PATH%>/web/common/dhtmlxgrid_mcol.js"></script>

<div id="mygrid_container" style="width:600px;height:150px;"></div>
<script>


mygrid = new dhtmlXGridObject('mygrid_container');

mygrid.setImagePath("<%=UIAttributes.APP_PATH%>/web/imgs/");

mygrid.setHeader("NAME,CREATE_OPS_JOB,CREATE_MKT_JOB");
    
mygrid.setInitWidths("*,100,100,100,100");

mygrid.setColAlign("left,center,right");
     mygrid.setColTypes("tree,ed,ed");
mygrid.setSkin("light");
    mygrid.init();

var mygrid;
function doInitGridXml(){
mygrid.loadXML("<%=UIAttributes.APP_PATH%>/web/testgrid1.xml");

}


and my xmlFile is
<?xml version="1.0" encoding="UTF-8"?>
<rows parent="0">
<row id="11" open="1">
<cell > first column data </cell>
<cell> second column data </cell>
<row id="110"> sub row
<cell> first column data </cell>
<cell> second column data </cell>
</row>
</row>
<row id="12" >
<cell> first column data </cell>
<cell> second column data </cell>
</row>
</rows>



It gives me an error while loading the Xml.
The error is "Incorrect XML"
Pls advice
Answer posted by dhxSupport on Aug 27, 2009 09:10