1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    235
    Vote Rating
    0
    chandan.behura is on a distinguished road

      0  

    Default filter

    filter


    How to filter a specific value of a combo on render of that combo.
    i mean i have a , d ,c ,d in my store of combo.
    on render of that i want only 3 i.e a,b,d

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,077
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You can use beforequery:

    Code:
        Ext.create('Ext.form.ComboBox', {
            fieldLabel: 'Filtered Cities',
            store: cities,
            queryMode: 'local',
            displayField: 'name',
            valueField: 'abbr',
            renderTo: Ext.getBody(),
            listeners: {
                beforequery: function(queryEvent){
                    cities.clearFilter(true);
                    cities.filter({
                        property: 'state',
                        value: 'AK'
                    });
                }
            }
        });
    Scott.

Thread Participants: 1

Tags for this Thread