Required library edition:
Required library file: dhtmlxgrid_drag.js
redefine this method in your code to define how tree node values should be used in grid (using input parameters you can change id of new row, values for cells, userdata blocks etc.).
Returns if true, then tree node should be moved to grid, else - copied
grid.treeToGridElement = function(tree,treeID,gridID){ var z=[treeObj.getItemText(treeID)]; // set tree text as a value of the first column in the grid return z; }
See also: rowToDragElement