के डेटास्टोर को गतिशील रूप से बदलना मेरे पास एक कॉम्बो बॉक्स है जो किसी अन्य combobox के चयन के आधार पर अपने मानों को पॉप्युलेट करता है। मैंने उदाहरण देखे हैं जहां चयन के आधार पर अंतर्निहित स्टोर में पैराम बदल दिए गए हैं, लेकिन मैं जो हासिल करना चाहता हूं वह पहले कॉम्बो के चयन के आधार पर स्टोर को दूसरे कॉम्बो के रूप में बदलना है। यह मेरा कोड है, लेकिन यह काम नहीं करता है। क्या कोई मदद कर सकता है?एक कॉम्बोबॉक्स
{
xtype: 'combo',
id: 'leads_filter_by',
width: 100,
mode: 'local',
store: ['Status','Source'],
//typeAhead: true,
triggerAction: 'all',
selectOnFocus:true,
typeAhead: false,
editable: false,
value:'Status',
listeners:{
'select': function(combo,value,index){
var filter_to_select = Ext.getCmp('cmbLeadsFilter');
var container = filter_to_select.container;
if (index == 0){
filter_to_select.store=leadStatusStore;
filter_to_select.displayField='leadStatusName';
filter_to_select.valueField='leadStatusId';
} else if(index==1) {
filter_to_select.store=leadSourceStore;
filter_to_select.displayField='leadSourceName';
filter_to_select.valueField='leadSourceId';
}
}
}
},
{
xtype: 'combo',
id: 'cmbLeadsFilter',
width:100,
store: leadStatusStore,
displayField: 'leadStatusName',
valueField: 'leadStatusId',
mode: 'local',
triggerAction: 'all',
selectOnFocus:true,
typeAhead: false,
editable: false
},