Tree inside dhtmlxGrid

Hello,

I’m trying to insert a tree into a dhtmlxgrid cell like in this example: dhtmlx.com/docs/products/dhtmlxG … _tree.html

I get no error but my tree is not draw. Please see below my function wich is pretty much the same as the one in the example: (I used alerts to be sure that every line returns no error)

function Tree(){
tree=new dhtmlXTreeObject(“treeboxbox_tree”,“100%”,“100%”,0);
alert(‘111’);
tree.setImagePath(“dxtmlxgrid/codebase/imgs/dhxtree_skyblue/”);
alert(‘gftgtr’);
//tree.enableDragAndDrop(true);
tree.setSkin(“dhx_skyblue”);alert(‘aaa’);
tree.loadXML(“dxtmlxgrid/samples/dhtmlxTree/common/tree.xml”,function()
{
alert(‘bbb’);
mygrid = new dhtmlXGridObject(‘gridbox_container’);
alert(‘ccccc’);
//mygrid.setMultiRows = true;
mygrid.setImagePath(“dxtmlxgrid/codebase/imgs/”);
alert(treeArray);
mygrid.setHeader(“Cod,Cantitate,Denumire,Pret,In Stoc,Transport,Localitate,Total”);
alert(‘dddddd’);
mygrid.setInitWidths(“50,150,100,80,80,80,80,200”)
mygrid.setColAlign(“right,left,left,right,center,left,center,center”)
alert(‘eee’);
mygrid.setColTypes(“dyn,ed,stree,price,ch,co,co,ro”);
mygrid.setSubTree(tree,2,0);
//mygrid.setSubTree(tree,3,0);
alert(‘fff’);
//mygrid.setMultiLine(true);
//mygrid.enableDragAndDrop(true);
mygrid.init();
mygrid.setSkin(“dhx_skyblue”);
alert(‘gggg’);
mygrid.parse(MyMatrix,“jsarray”);alert(‘hhhh’);
tree.setSerializationLevel(true,true);
});
}

I appreciate your help :slight_smile:

I just found out that I have to have the pro edition for using dhtmlxgrid_excell_tree.js.

Can anybody give me another solution?

Hi

Could you let us know what error are you getting? Maybe that will help us to figure out what exactly the issue is…

The “tree” exCell is available in standard version of dhtmlxSuite.
But note that in addition to the dhtmlxgrid component you to include the dhtmlxTree component files on your page.