我使用编辑器选项在 extjs 中设计网格。我需要组合框作为一列,当我编辑网格时也需要组合框。我需要删除列作为编辑和普通网格的复选框列。它不工作。谁能帮帮我吗
这是片段:
this.mcmGridPanel = new Ext.grid.GridPanel({
height: 300,
width: 690,
title: 'Results',
store: store,
multiSelect: true,
x: 0,
y: 170,
columns: [
{ xtype: 'gridcolumn', text: 'FlightNumber', sortable: true, flex: 1, width: 150, dataIndex: 'FlightNumber', hidden: true,
editor: new Ext.form.field.ComboBox({
typeAhead: true,
triggerAction: 'all',
selectOnTab: true,
lazyRender: true,
listClass: 'x-combo-list-small'
})
},
{ xtype: 'gridcolumn', text: 'Origin', sortable: true, width: 150, dataIndex: 'Origin',
editor: {
editor: new Ext.form.field.ComboBox({
typeAhead: true,
triggerAction: 'all',
selectOnTab: true,
lazyRender: true,
listClass: 'x-combo-list-small'
})
}
},
{ xtype: 'gridcolumn', text: 'Destination', sortable: true, width: 150, dataIndex: 'Destination',
editor: {
editor: new Ext.form.field.ComboBox({
typeAhead: true,
triggerAction: 'all',
selectOnTab: true,
lazyRender: true,
listClass: 'x-combo-list-small'
})
}
},
{ xtype: 'datecolumn', text: 'StartDate', width: 80, dataIndex: 'StartAvailability', format: 'Y-m-d',
editor: {
xtype: 'datefield',
allowBlank: false,
format: 'Y-m-d'
}
},
{ header: 'StartTime', text: 'StartTime', width: 60, dataIndex: 'StartAvailabilityTime',
editor: {
xtype: 'timefield',
format: 'H:i',
increment: 15,
allowBlank: false
}
},
{ xtype: 'datecolumn', text: 'EndDate', width: 80, dataIndex: 'EndAvailability', format: 'Y-m-d',
editor: {
xtype: 'datefield',
allowBlank: false,
format: 'Y-m-d'
}
},
{ header: 'EndTime', text: 'EndTime', width: 60, dataIndex: 'EndAvailabilityTime',
editor: {
xtype: 'timefield',
format: 'H:i',
increment: 15,
allowBlank: false
}
},
{
xtype: 'gridcolumn',
text: 'Delete?',
header: 'Delete?',
dataIndex: 'delete',
width: 60,
renderer: function (value, meta, record, rowIndex, colIndex) {
return '<center><input type="checkbox" id="Delete-' + rowIndex + '"/></center>';
},
handler: function() {
},
//disabled: true,
editor: {
xtype: 'checkbox',
cls: 'x-grid-checkheader-editor',
}
}
]
});
我使用以下代码,但它不起作用。谁能帮帮我吗