Check documentation for the latest version 6.0 of dhtmlxSuite gridToTreeElement DHTMLX Docs

gridToTreeElement

redefine this method in your code to define how grid row values should be used in tree

void gridToTreeElement(object treeObj,string|number treeNodeId,string|number gridRowId);

Parameters

treeObjobjectobject of tree
treeNodeIdstring|numberid of the node created in tree
gridRowIdstring|numberid of the grid row

Available only in PRO Edition

Example

myGrid.gridToTreeElement = function(tree,treeID,gridID){
    return this.cells(gridId,0).getValue(); //take data from 1st column as a tree value
};

Details

using input parameters you can change id of a new tree node, set label, set userdata blocks, etc.

Back to top