Check documentation for the latest version of dhtmlxSuite treeToGridElement DHTMLX Docs

treeToGridElement

redefine this method in your code to specify how tree node values should be used in the grid

void treeToGridElement(object treeObj,string|number treeNodeId,string|number gridRowId);
treeObjobjecta tree object
treeNodeIdstring|numberthe id of a node created in the tree
gridRowIdstring|numberthe id of a grid's row

Available only in PRO Edition

Example

grid.treeToGridElement = function(tree,treeID,gridID){
  var z=[treeObj.getItemText(treeID)]; //set tree text as a value of 1st column in grid
  return z;
}

Details

by using the input parameters you can change the id of a new row, values for cells, userdata blocks, etc.

Back to top