View Full Version : populate comboBox using remote JSON store

26 Nov 2009, 2:59 AM

I am using first example as per following url


I have local data store in js file and I want to fetch data from db and show using json.
I am trying to use remote data store using url in data store definition but it is not working.

I have attached all working pages with this thread.

// simple array store
var store = new Ext.data.ArrayStore({
fields: ['abbr', 'state', 'nick'],
data : Ext.exampledata.states // from states.js

var dd = new Ext.data.ArrayStore({
url: 'states.php',
fields: ['state'],
data : Ext.countrydata.states // from states.js


var remoteJsonStore = new Ext.data.JsonStore({
fields: ['state'],
url : 'http://localhost/ComboBoxes_files/states.php',
data : Ext.countrydata.states

var combo = new Ext.form.ComboBox({
store: remoteJsonStore,
typeAhead: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
emptyText:'Select a state...',
applyTo: 'local-states'

26 Nov 2009, 5:09 AM
I check following article


but with

1.combo box keyword search facility available in local data store.
2.combo box keyword search facility not available in remote data store.

any idea

I want

1.Remote data combo box
2.key word search facility in combo
3.data listing from remote data store.

26 Nov 2009, 6:21 AM
You don't need
data : Ext.countrydata.states in the remoteJsonstore,
and you need to set mode:'remote' in the ComboBox. Try and see if it works.