Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Michael on Dec 08, 2008 07:14
open dhtmlx forum
Drag from Grid - Drop into tree

I am getting some very strange results.

Here is what I am doing. I am dragging rows from grid to tree. I have a event tied to the drop event.

When I drop and do an alert() to see what the id of the source row is, it is not always correct. It just seems like a random number is being generated. It is not properly getting the id of the xml row.
Answer posted by Support on Dec 08, 2008 08:20
onDrop event handler provides actual id of inserted item. To prevent non-unique IDs , tree can add some random elements to the ID of draged row. 
If you need to catch original ID - use unique IDs for tree and grid elements, or just use onDrag event, it occurs before tree logic processing, so it provides trully source ID