열의 인라인 편집을 허용하는 격자 패널이 있습니다. 이 열은 편집기로 콤보 상자를 사용하며 "change"이벤트 나 "select"이벤트도 편집 된 값을 백 트레이스하여 그리드 패널에서 변경된 행을 가져올 수없는 어떤 것을 제공합니다. ExtJS의 GridPanel에서 모델 얻기
나는 내선 내가 그리드로 돌아combo.up()
같은 간단한 일을 할 수 없도록 때문에 에디터의 콤보 상자를 수레 생각합니다. 어떤 도움
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
}
}
});
},
감사 :
여기{
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
})]
}
이에 관한 컨트롤러 코드 :
다음은 뷰에서 그리드 패널입니다!
답장을 보내 주셔서 감사합니다. 이것은 찾고있는 라인을 따라 있습니다. – thinkdevcode