PDA

View Full Version : [CLOSED] Drag/Drop - Grid to Treecontrol example



jhlocus
Aug 07, 2012, 8:36 AM
When Dragging from Grid to Tree - The column is delete as it should but when dragging from tree to grid the column is not deleted from the tree

To replicate drag a column from grid to a folder in the tree, and back to the grid and press the "-" and "+" then the column is back again.


Can correct the issue by adding the following in "beforenodedrop"



var item = data.view.store.treeStore.tree.getRootNode().findC hild('ID', data.records[0].data.ID, true);
var parentNode = item.parentNode;
item.remove();

// To update the +/- status
if (!parentNode.hasChildNodes()) {
parentNode.set('leaf', true);
}




http://examples2.ext.net/#/DragDrop/Grid/Grid_to_Tree/

Daniil
Aug 07, 2012, 9:40 AM
Hi,

Thanks for the report. Fixed in SVN and online.

Please replace

rec.stores[0].remove(rec);
with

rec.remove(true);
within the beforenodedrop function.