beforedrop: function (node, data) {
data.records[0].set('leaf', true);
data.copy = true;
}
right now the code just copies the grid row to tree as a leaf. Is there any way to update the leaf it is dropped on instead of adding a new leaf.
Printable View
beforedrop: function (node, data) {
data.records[0].set('leaf', true);
data.copy = true;
}
right now the code just copies the grid row to tree as a leaf. Is there any way to update the leaf it is dropped on instead of adding a new leaf.
So when you drag a row from a grid and drop it on a node in the tree, you want to update the node data?
am doing
beforedrop: function (node, data, overModel, dropPos, opts) {overModel.set('id', data.records[0].get('roleID'));overModel.set('name', data.records[0].get('person'));}is that the right approach?