PDA

View Full Version : Grid drag and drop : copying a row twice from source grid



anaP
10 Apr 2012, 9:11 PM
Hi,
I am using drag n drop plugin to copy rows from one grid to another.
I wish to drag the same row more than once to another grid.
but if I do so it gives me this error
Uncaught TypeError: Cannot read property 'internalId' of undefined
Ext.define.updateIndexesext-all-debug.js:58747
Ext.define.onAddext-all-debug.js:58701
Base.callParentext-all-debug.js:2833
Ext.define.onAddext-all-debug.js:76399
fireext-all-debug.js:10259
Ext.define.fireEventext-all-debug.js:13385
Ext.define.insertext-all-debug.js:44663
Ext.define.handleNodeDropext-all-debug.js:78650
processDropext-all-debug.js:78602
Ext.define.onNodeDropext-all-debug.js:78613
Ext.define.notifyDropext-all-debug.js:61629
Ext.define.onDragDropext-all-debug.js:37030
Ext.define.fireEventsext-all-debug.js:30708
(anonymous function)ext-all-debug.js:1572
Ext.define.handleMouseUpext-all-debug.js:30521
(anonymous function)
wrap
Can anyone suggest me how to implement it..

friend
11 Apr 2012, 4:50 AM
In the drop event handler, you'll need to clone the incoming record prior to adding it to the target grid.



viewConfig: {
plugins: {
ptype: 'gridviewdragdrop',
dragGroup: 'gridDDGroup',
dropGroup: 'gridDDGroup'
},
listeners: {
drop: function(node, data, dropRec, dropPosition) {
// clone dropRec, then add it to the grid's store.
}
}
}