Abhijit Muke
Abhijit Muke

Reputation: 1214

how to show different value of single store in 2 combo box?

I have Problem with Store in ExtJS 4. In my application I want to use two combo. A store values are displaying in both combo. But the problem is the value selected in first combo should not get shown in next combo. Due to single store I'm unable to make it happen..What should have to do ?

Upvotes: 1

Views: 106

Answers (2)

Abhijit Muke
Abhijit Muke

Reputation: 1214

This Works for me

listeners : {
               expand: function() {
               boxerListStore.filter(function(r) {
                       var value = r.get('id');                       
                       var getValue = Ext.getCmp('boxer2').getValue();                           
                       return (value != getValue);
               });
             }
          }

Upvotes: 1

Avinash T.
Avinash T.

Reputation: 2349

You can use select event of first combo like -

    listeners: {
        select: function(combo, records, eOpts){
            Ext.getCmp('secondCombo').select(records[0]);
        }
    }

Upvotes: 0

Related Questions