私は、列のインライン編集を可能にするグリッドパネルを持っています。このコラムはエディターとしてコンボボックスを使用し、 "change"イベントと "select"イベントのどちらも、編集された値をバックトレースして、変更された行をグリッドパネルから取得することができません。ExtJSのGridPanelからモデルを取得
私はextがそうので、私は、グリッドに戻るには
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