首页 > 代码库 > EXTJS4.2 级联 下拉

EXTJS4.2 级联 下拉

items: [
        {
            xtype: "fieldcontainer",
            layout: "hbox",
            items: [{
                xtype: ‘combo‘, 
                name: ‘ModelId‘,
                fieldLabel: ‘服务模型‘,
                store: comStore_CCServiceModel,
                valueField: "ModelId",
                displayField: "ModelName",
                mode: ‘remote‘,//local
                editable: false,
                triggerAction: ‘all‘,
                autoload: true,
                listeners: {
                    "select": function (combo, store, index) {

                        var CCTypeId = form.form.findField(‘CCTypeId‘);
                        CCTypeId.clearValue();

                        var ModelId = form.form.findField("ModelId").getValue();
                        CCTypeId.store.load({
                            params: {
                                ModelId: ModelId
                            }
                        });
                    }
                }              
            }]
        },{
            xtype: "fieldcontainer",
            layout: "hbox",
            items: [{
                xtype: ‘combo‘,
                name: ‘CCTypeId‘,
                fieldLabel: ‘服务方式‘,
                store: comStore_CCServiceCategory,
                valueField: "CCTypeId",
                displayField: "CCTypeName",
                editable: false,
                triggerAction: ‘all‘,
                allowBlank: false,
                autoload: false,
                queryMode: ‘local‘,
            }]
        },

 

EXTJS4.2 级联 下拉