extjs网格中具有拖放功能的行的顺序
我在网格中使用拖放功能,如下所示:extjs网格中具有拖放功能的行的顺序,extjs,drag-and-drop,grid,Extjs,Drag And Drop,Grid,我在网格中使用拖放功能,如下所示: { xtype: 'gridpanel', id: 'editlinesGrid', title: 'line', forceFit: true, store: 'gridEditlines', region: 'center', viewConfig: { plugins: [ Ext.create('Ext.grid.plugin.DragDrop', { ptype: 'gridviewdragdrop' })],
{
xtype: 'gridpanel',
id: 'editlinesGrid',
title: 'line',
forceFit: true,
store: 'gridEditlines',
region: 'center',
viewConfig: {
plugins: [
Ext.create('Ext.grid.plugin.DragDrop', {
ptype: 'gridviewdragdrop'
})],
listeners: {
drop: {
fn: me.onGriddragdroppluginDrop,
scope: me
}
}
},
columns: [{
xtype: 'rownumberer',
dataIndex: 'stopOrder'
}, {
xtype: 'gridcolumn',
dataIndex: 'stopId',
text: 'stopId',
field: {
xtype: 'combobox',
allowBlank: false,
displayField: 'stopId',
store: 'gridStops'
}
},
当我将行拖动到更高或更低的位置时,我需要将新位置发送到服务。我需要发送的是:
{
"stopOrder": 1, <-- here should be the new position in the grid
"stopDTO": {
"stopId" : 1
}
}
我需要做什么才能将数据发送回服务?如果问题没有回答,我也会花一些时间“查找”它,这是指向主要sencha文档的链接,如果问题没有回答,我也会花一些时间“查找”它,这是指向主要sencha文档的链接
onGriddragdroppluginDrop: function(node, data, overModel, dropPosition, options) {
alert(data);
},