1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
var mass_combo = new Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
id: 0,
fields: [
'myId',
'displayText'
],
data: [[1, 'High'], [2, 'Medium'], [3, 'Low']]
}), // eo store
valueField: 'myId',
displayField: 'displayText'
}); // eo editor
App.table.Spreadsheet = Ext.extend(Ext.grid.EditorGridPanel, {
//Defaults
title : 'Generic spreasheet'
,iconCls : 'icon-spreadsheet'
// ,intern_mass_combo: new Ext.form.ComboBox({...}) doesn't work as expected
,initComponent : function() {
App.table.Spreadsheet.superclass.initComponent.call(this);
}
columns: [{
header : 'H1'
,dataIndex : 'h1'
,editor : new Ext.form.Checkbox()
}
,{
header : 'H2'
,dataIndex : 'h2'
,editor : mass_combo
,renderer : Ext.util.Format.comboRenderer(mass_combo)
// ,renderer : Ext.util.Format.comboRenderer(this.intern_mass_combo) // doesn't work
}
]
}); |