Mcaveti
18 Apr 2012, 6:32 PM
Hello!
i try to use show event of Combobox, but it don't work
this example from docs whith listeners
// The data store containing the list of statesvar
states = Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data : [
{"abbr":"AL", "name":"Alabama"},
{"abbr":"AK", "name":"Alaska"},
{"abbr":"AZ", "name":"Arizona"}
//...
]});
// Create the combo box, attached to the states data store
Ext.create('Ext.form.ComboBox', {
fieldLabel: 'Choose State',
store: states,
queryMode: 'local',
displayField: 'name',
valueField: 'abbr',
renderTo: Ext.getBody(),
listeners:{
//scope: yourScope,
activate: function() { alert('activate')}, // don't work
show: function() { alert('show')}, // don't work
expand: function() { alert('expand')}, // work
afterrender: function() { alert('afterrender')}, // work
}});
i need this events then combobox use as editor in grid
columns... {header: ... editor: field_edit()}...
function fiel_edit () {
return {
xtype: 'combobox',
triggerAction: 'all',
queryMode: 'local',
store: store,
displayField: 'Name',
valueField: 'ID',
editable: false,
listeners: {
show: function() { alert('show') }, // don't work
beforeshow: function() { alert('beforeshow') }, // don't work
activate: function() { alert('activate') } // don't work
}
}}
it is expected that the event should be triggered before and during the showing of the combobox
How to tigger this events?
Thanks in advance
i try to use show event of Combobox, but it don't work
this example from docs whith listeners
// The data store containing the list of statesvar
states = Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data : [
{"abbr":"AL", "name":"Alabama"},
{"abbr":"AK", "name":"Alaska"},
{"abbr":"AZ", "name":"Arizona"}
//...
]});
// Create the combo box, attached to the states data store
Ext.create('Ext.form.ComboBox', {
fieldLabel: 'Choose State',
store: states,
queryMode: 'local',
displayField: 'name',
valueField: 'abbr',
renderTo: Ext.getBody(),
listeners:{
//scope: yourScope,
activate: function() { alert('activate')}, // don't work
show: function() { alert('show')}, // don't work
expand: function() { alert('expand')}, // work
afterrender: function() { alert('afterrender')}, // work
}});
i need this events then combobox use as editor in grid
columns... {header: ... editor: field_edit()}...
function fiel_edit () {
return {
xtype: 'combobox',
triggerAction: 'all',
queryMode: 'local',
store: store,
displayField: 'Name',
valueField: 'ID',
editable: false,
listeners: {
show: function() { alert('show') }, // don't work
beforeshow: function() { alert('beforeshow') }, // don't work
activate: function() { alert('activate') } // don't work
}
}}
it is expected that the event should be triggered before and during the showing of the combobox
How to tigger this events?
Thanks in advance