我有一个允许内联编辑列的网格面板。此列使用组合框作为编辑器,并且“change”事件和“select”事件都不会为我提供可回溯编辑值的内容,以从gridpanel获取已更改的行。从GridPanel在ExtJS中获取模型
我相信分机浮动编辑的组合框所以因此我不能做一些简单的像
combo.up()
要返回到电网。
下面是从视图中的网格面板:
{
xtype: 'gridpanel',
title: 'Important Projects',
id: 'importantProjectsGrid',
dockedItems: [],
flex: 1,
columns: [
{ header: 'Quote Name', dataIndex: 'QuoteName', flex: 4 },
{ header: 'Quote Status', dataIndex: 'QuoteStatusID', flex: 6, editor: {
xtype: 'combobox',
editable: false,
action: 'QuoteStatus',
selectOnTab: true,
store: 'statuses',
queryMode: 'local',
displayField: 'Description',
valueField: 'Description'
} }
],
store: 'myimpprojects',
selModel: {
selType: 'cellmodel'
},
plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})]
}
下面是关于这个控制器代码:
init: function() {
this.control({
'[action=QuoteStatus]': {
change: function (combo, new_value, old_value, opts) {
// I need to go back up from this combobox
// to get the row that this value was edited in
// to grab an ID value from that row's data
// in order to make an ajax request
}
}
});
},
感谢您的帮助!
谢谢你回答,这是我寻找的东西 – thinkdevcode 2012-02-14 19:58:56