Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Amb on Nov 04, 2008 04:13
open dhtmlx forum
TreeGrid XML

Hi, I've got the PRO edition and I'm trying to set up a TreeGrid. My intention is that this XML would produce a non-expanded root labelled "Hello Goodbye" and would expand when I clicked it. Instead I get 2 rows, with blanks in the first column. The "Hello Gooddbye doesn't appear anywhere. What I am dong wrong? Thanks.

<?xml version="1.0" encoding="UTF-8"?>
<rows>
<row id="0">
<cell>Hello Goodbye</cell>
<row id="0.0">
<cell />
<cell>21/05/2008</cell>
<cell>Phone call</cell>
<cell>Cold call</cell>
<cell>HSD</cell>
</row>
<row id="0.1">
<cell />
<cell>24/05/2008</cell>
<cell>Phone call</cell>
<cell>Follow up</cell>
<cell>KJN</cell>
</row>
</row>
</rows>

Here's my setup JS:

var CompanyContactHistorygrid;

var CompanyContactHistorygridAjaxHandler = "?wicket:interface=:0:CompanyContactHistory::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true";

function initCompanyContactHistorygrid(){
    CompanyContactHistorygrid = new dhtmlXGridObject("CompanyContactHistory");
    CompanyContactHistorygrid.setImagePath("../dhtmlx/imgs/");
    CompanyContactHistorygrid.setHeader("Contact,Date,Type of Contact,Description,Who");
    CompanyContactHistorygrid.attachHeader(",,#combo_filter,#text_filter,#combo_filter");
    CompanyContactHistorygrid.setInitWidths("100,100,100,300,100");
    CompanyContactHistorygrid.setColumnIds("Contact,Date,Type,Description,Who");
    CompanyContactHistorygrid.setColSorting("str,date,na,na,na");
    CompanyContactHistorygrid.setColAlign("left,left,left,left,left");
    CompanyContactHistorygrid.setColTypes("tree,ro,ro,ro,ro");
    CompanyContactHistorygrid.enableSmartRendering(true,50);
    CompanyContactHistorygrid.setSkin("light");
    CompanyContactHistorygrid.init();
    CompanyContactHistorygrid.loadXML(CompanyContactHistorygridAjaxHandler + "&requestType=loadXML");
Answer posted by Support on Nov 04, 2008 04:47
ID = 0 , reserved for invisible root item. Try to use any other ID for the reow. 

<rows> 
<row id="r0">