View Full Version : Drop between rows

29 Jan 2014, 4:14 AM
Hello i am have two grids and make drag and drop for transfer rows. But i have problem when i am drop I can only insert a record to the end of grid, if i am insert in other place on grid, them droped row didn"t insert. i am want insert records in any place in the end grid to the beginning grid between the rows, help me! :) Thanks

listeners: {
drop: function(node, data, dropRec, dropPosition) {
beforeDrop: function(node, data, overModel, dropPosition, dropHandlers) { records = []
Ext.each(data.records, function(item, index, allItems) {
theStore = node.view.panel.up('window').theStore;
records.push(Ext.create('TPL.model.BookAdd', {
bookId: item.data.id,
authorId: Ext.getCmp('authorId').getValue(),
price: item.data.payload,
seller: theStore.findRecord('id', parseInt(item.data.sellerId)).get('name'), })); });
data.records = records;
return true;
} }

29 Jan 2014, 5:42 AM
This example is allowing for this:

Are you sure you do not have a sort setup?