Using 5.0 Pro
I currently have a treegrid with “complex” set. When dragging a record between two records (the black line shows), Is there a way to know when dropping on an existing record or between two records. I need to know so I can update my data showing the proper parent. Any assistance would be greatly appreciated.
Steve
You can get the id of the target row (on which position a dragged on was placed) from the onDrop event:
https://docs.dhtmlx.com/api__link__dhtmlxtreegrid_ondrop_event.html
Thanks sematik,
My issue is I need to know when dropping between two records, not on a target row
S
You can get all the information on the position of the dropped rows from the onDrop event.
Like:
myTreeGrid.attachEvent("onDrop", function(sId,tId,dId,sObj,tObj,sCol,tCol){
var par = myTreeGrid.getParentId(sId);
if (par == tId)
console.log("dropped on row")
else
console.log("droppped between the rows")
return true
});