【发布时间】:2014-02-09 08:38:20
【问题描述】:
我是 extJS 的新手。我有 2 个与公共数据存储绑定的组合框。 下面是商店-
comboStore = new Ext.data.JsonStore({
url: 'Getvalues',
root: 'rows',
autoLoad: true,
fields: ['Type', 'TypeDetails']
});
这里Type 是一个字符串,TypeDetails 是一个具有字段Description 的数组列表。一个Type 可以有多个Description。
我的要求是,我必须将一个组合框与Type 绑定,并且当我选择一个Type 时,只有当前Type 的Description 应该与组合框2 绑定。
我试过了-
xtype: 'combo',
id: 'cmbType',
editable: true,
typeAhead: true,
allowBlank: false,
displayField: 'Type',
valueField: 'Type',
hiddenName: 'Type',
store: comboStore,
mode: 'local',
triggerAction: 'all',
selectOnFocus: true,
emptyText: 'Select Type'
, listeners: {
select: function (cmb, record, index) {
}
}
xtype: 'combo',
id: 'cmbDesc',
editable: true,
typeAhead: true,
allowBlank: false,
displayField: 'Description',
valueField: 'Description',
hiddenName: 'Description',
store: comboStore,
mode: 'local',
triggerAction: 'all',
selectOnFocus: true,
emptyText: 'Select Type first'
combo1 select 应该怎么做?
我正在使用 extJS 3.4
【问题讨论】: