View Full Version : ComboBox does not have getStore method

15 Aug 2011, 8:36 AM
The API docs for ExtJS 4.0 list a getStore method for the ComboBox component: http://docs.sencha.com/ext-js/4-0/#/api/Ext.form.field.ComboBox

But calling getStore() on a created ComboBox returns

Uncaught TypeError: Object [object Object] has no method 'getStore'

Furthermore, inspecting the __proto__ property of a created ComboBox object in the Console reveals that such a method is not defined for the object.

18 Aug 2011, 10:23 AM
They are suppose to have this fixed related to:
http://www.sencha.com/forum/showthread.php?138850-EXTJSIV-2366-getStore()-Missing-for-ComboBox (http://www.sencha.com/forum/showthread.php?138850-EXTJSIV-2366-getStore%28%29-Missing-for-ComboBox)

I don't know when this will be available though... For now, you can override it this way:

Ext.override(Ext.form.field.ComboBox, {
getStore : function(){
return this.store;

18 Aug 2011, 10:38 AM
Another way to add getStore()

getStore : function(){
return this.store;