Treegrid not visible

If I try:

var myGrid = new dhtmlXTreeObject(“treegrid”,“100%”,“100%”,“root”);
myGrid.enableTreeLines(true);
myGrid.enableHighlighting(true);

  myGrid.loadXML("myfile.xml", function () {
   document.getElementById("hide_message").style.display = 'none';
  });

everything is ok. But if I attach the div to a layout cell using

b.attachObject(“treegrid”);

no treegrid is visible - also no errormessages are visible.

What could be wrong.

If you need to attach your grid/treegrid to a layout you need to use the attachGrid() method:
docs.dhtmlx.com/api__link__dhtml … hgrid.html

Hi,

is there an example??

I don´t understand how to reference to my treegrid.

I´ll try this:

var myGrid = main_layout.cells(“b”).attachGrid(“100%”,“100%”);

then myGrid is undefined ???

Here you can find a working example:
dhtmlx.com/docs/products/dhtmlxL … egrid.html

OK,

understand.

Is there a more detailed description about the format of loaded XML?

basic example showing the main principals can be found here:
docs.dhtmlx.com/treegrid__treegr … n.html#xml
a more detailed example you can find in the dhtmlxGrid tutorial:
docs.dhtmlx.com/grid__data_forma … #xmlformat