Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Dominik on Jan 27, 2008 23:16
open dhtmlx forum
dhtmlxTree as cell editor for dhtmlxGrid

I would like to use dhtmlxTree as a excell-editor for a column in dhtmlxGrid (i.e., when the cell is double-clicked, a dhtmlxTree should open, where I can pick a node, which is then used as new content for this cell). According to the documentation, when the cell type is 'stree', dhtmlxTree is the cell editor. But how do I exactly implement this? How do I couple a dhtmlxTree object to the grid as editor? I haven't found any example demonstrating this.

Thanks in advance for any help.
Answer posted by Support on Jan 28, 2008 07:23
Please check
    http://dhtmlx.com/docs/products/dhtmlxGrid/samples/interaction_other_components/pro_linked_tree.html?un=1201534501000

Basically you need

a) create tree object in default way
    tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
    ...

b) define column type as stree
    mygrid.setColTypes("dyn,ed,stree,price,ch,co,ra,ro");
c) attach tree to specific column of grid
    mygrid
.setSubTree(tree,2); // 2 - index of column