PDA

View Full Version : Update Node leaf



xanderdrax
9 Nov 2012, 2:11 PM
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.

mitchellsimoens
14 Nov 2012, 10:16 AM
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?

xanderdrax
14 Nov 2012, 11:42 AM
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?