1. #1
    Ext User
    Join Date
    Nov 2009
    Posts
    2
    Vote Rating
    0
    zohaib is on a distinguished road

      0  

    Question populate comboBox using remote JSON store

    populate comboBox using remote JSON store


    Hi,

    I am using first example as per following url

    http://www.extjs.com/deploy/dev/exam...rm/combos.html

    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.

    Code:
    // 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,
            displayField:'state',
            typeAhead: true,
            mode: 'local',
            forceSelection: true,
            triggerAction: 'all',
            emptyText:'Select a state...',
            selectOnFocus:true,
            applyTo: 'local-states'
        });
    Attached Files

  2. #2
    Ext User
    Join Date
    Nov 2009
    Posts
    2
    Vote Rating
    0
    zohaib is on a distinguished road

      0  

    Arrow


    I check following article

    http://www.quizzpot.com/2009/10/comb...-and-remotely/

    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.

  3. #3
    Ext User
    Join Date
    Oct 2009
    Posts
    59
    Vote Rating
    0
    jsemmanuel is on a distinguished road

      0  

    Default


    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.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar