Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by c. bernstein on Oct 29, 2009 08:42
open dhtmlx forum
TreeGrid getParentId() not working (using dynamic loading)

I have two tree grids, and I am retrieving the children of a row when the '+' is clicked. I am trying to drag a row from one grid to the other, in a tree that has been expanded dynamically using '+'. However, after I drag the row over and call getParentId(), the parent id comes back undefined. Is this because the tree has been expanded dynamically? How can I get around this?

Thanks.
Answer posted by dhxSupport on Oct 30, 2009 03:40
Unfortunately we cannot reproduce this issue locally. Please provide us code example where we can reproduce it. Please send such example directly to the support@dhtmlx.com.
Answer posted by Stanislav (support) on Oct 30, 2009 05:43
Beware that row's ID can be changed after d-n-d operation ( can be done to guarantee unique ID for the row ) 
You can use onDrop event to get the new ID value ( if it was changed ) and use it to locate the new parent of the row