开发者

Linked Combobox (filter store)

开发者 https://www.devze.com 2023-04-08 02:49 出处:网络
you need when choosing to download a combobox CountryComboBox combobox CityComboBox list of products filtered by field *city_id*. My code works, but not the first time))

you need when choosing to download a combobox CountryComboBox combobox CityComboBox list of products filtered by field *city_id*. My code works, but not the first time)) Opt for the first combobox value - I go in the second - the filter does not apply. Click again on the first, again in the second - and that's only if it is applied. What am I doing wrong? And then make a filter for the output grid, as well as for the combobox?

ExtJs 3.

My Code:

tbar: [
{
    xtype     : 'CountryComboBox', // expansion Ext.form.ComboBox
    listeners : {
        'select' : {
            fn : function(combo, value) {
                var combobox_city = Ext.getCmp('ProductsProductTypeComboBoxForProduct');
                combobox_city.enable();
                combobox_city.clearValue();
                combobox_city.store.filter('city_id', combo.getValue(), true); 
            }
        } 
    }
},
{
    xtype     : 'CityComboBox', // expansion Ext.form.ComboBox
    disabled  : true,
    listeners : {
        'select' : {
            fn : function(combo, value) {
                this.st开发者_如何学编程ore.filter('people_id', combo.getValue(), true);
            } 
        }
    }
},  
... 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号