Extjs 提交网格Ext JS的编辑列

Extjs 提交网格Ext JS的编辑列,extjs,grid,Extjs,Grid,我有一个网格,看起来像这样 itemId: 'someGrid', xtype: 'grid', title: 'Some Grid', store: 'SomeStore', selType: 'cellmodel', plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 2 }) ], columns: [ { text: 'column1', dat

我有一个网格,看起来像这样

itemId: 'someGrid',
xtype: 'grid',
title: 'Some Grid',
store: 'SomeStore',
selType: 'cellmodel',
plugins: [
   Ext.create('Ext.grid.plugin.CellEditing', {
       clicksToEdit: 2
   })
],
columns: [
                { text: 'column1', dataIndex: 'dataIndex1', flex: 2.7 },
                { xtype: 'checkcolumn', text: column2, dataIndex: 'dataIndex2', flex: 2.7 },
                { xtype: 'checkcolumn', text: column3, dataIndex: 'dataIndex3', flex: 3 },
                { 
                    text: column4, dataIndex: 'dataIndex4', flex: 3.85,
                    editor: {
                        xtype: 'combobox',
                        itemId: 'someCOmbo',
                        store: 'SomeStoreOfCombo',
                        displayField: 'DataName',
                        valueField: 'DataId',
                        allowBlank: false,
                        editable: false,
                    }
                },
                {
                    text: column5, dataIndex: 'dataIndex5', flex: 3,
                    editor: {
                        xtype: 'textfield',
                        allowBlank: false,
                    }
                },
                {
                    text: column6, dataIndex: 'dataIndex6', flex: 3.1,
                    editor: {
                        xtype: 'textfield',
                        allowBlank: false,
                    }
                },
                { text: column7, dataIndex: 'dataIndex7', flex: 1.7 },
                { dataIndex: 'Id', hidden: true }
            ],

checkcolumns和column4、5和6都是可编辑的。我在网格下有一个按钮来提交更改。那么,我如何获得对网格所做的所有更改,以便我可以提交它?

这将直接编辑,因此您不需要按钮:

插件:[Ext.create'Ext.grid.plugin.CellEditing',{clicksToEdit:2, 监听器:[编辑:functioneditor,e{if e.value!==e.originalValue{this.someGrid.getStore.getByIde.record.data.ID.commit;}}]}

可能需要调整一下,因为我通常使用Ext.Net,只是试着翻译。但是你应该了解它背后的想法

如果需要按钮,请使用.sync;作为clickhandler


编辑:我不知何故无法使用换行符-有人可以编辑它吗?

在这个问题上您还需要帮助吗?您只是想知道如何获取标记为已更改的记录吗?