Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Robin on Oct 30, 2008 08:50
open dhtmlx forum
Drag node from Tree to TreeGrid

Hi,

I am dragging a node from tree to treegrid. I want to change the ID of new node (dragged) on GRID. For example, if id of node1 is "123" on tree, and when I drag node1 to treegrid; I want to set ID on node1 on treegrid to "567".

Is it possbile? If yes, please suggest me the way.

Thanks.

Robin
Answer posted by Support on Oct 30, 2008 10:00
Can be done by onDrop event

grid.attachEvent("onDrop",function(sid,tid,nid,sobj,tobj){
      //sid - id from the tree
      //nid current id in treegrid
      if (sid == "123")
          grid.changeRowId(nid,"576");
      return true;
});