tree in treegrid

I’m trying to place a tree in a treegrid column using stree

In the grid the value of the column is replaced with the text but if I doubleclick the cell no tree appears, it just sort of flashes but nothing happens

I had to add dhtmlxgrid_excell_tree.js (I’m using the full pro js)

Thanks for any help!

This is my code:

    mygrid = new dhtmlXGridObject(‘gridbox’);

    mygrid.setSkin(“modern”);

    mygrid.attachEvent(“onEditCell”,doOnCellEdit);

    mygrid.attachEvent(“onEnter”,doOnEnter);

    mygrid.attachEvent(“onRowSelect”,LoadProperties);

… other events …

    mygrid.imgURL = “/js/dhtmlx/imgs/”;

    mygrid.enableDragAndDrop(true);

    var tree=new dhtmlXTreeObject(‘treeBox’,“100%”,“100%”,0);

    if (coltree.length) {

        tree.loadXML("/xml/tree.exml?table="+tabtree, function(){

                mygrid.setSubTree(tree,4); //here I also put setSubTree(tree,4,0) but no change

                mygrid.loadXML("/xml/treegrid.exml?table="+n+’&tipo=’+tipo)

                mygrid.init();

        });

    }

    else mygrid.loadXML("/xml/treegrid.exml?table="+n+’&tipo=’+tipo);


Please check if in your grid 4th column has type “stree”. Also order of a command should be following:


if (coltree.length) {
tree.loadXML("/xml/tree.exml?table="+tabtree, function(){
mygrid.setSubTree(tree,4);
mygrid.init();
mygrid.loadXML("/xml/treegrid.exml?table="+n+’&tipo=’+tipo)

});
}
else{
mygrid.init();
mygrid.loadXML("/xml/treegrid.exml?table="+n+’&tipo=’+tipo);
}


If issue still occurs please provide us sample where we can reprodue it. You can send sample directly to the support@dhtmlx.com