【发布时间】:2011-09-20 15:47:24
【问题描述】:
我在 window->form->combo 中有组合框,我使用 form.loadRecord(record) 将数据从网格绑定到组合。
我的问题是:
绑定数据后,我触发combo改变combo数据,第一次combo扩展小,第二次点击后自动隐藏,只有combo项加载正确。
{
xtype: 'combobox',
editable: false,
id: 'USERTYPECmbo',
queryMode: 'remote',
displayField: 'USERTYPE',
store: Ext.create('Ext.data.Store', {
autoLoad: true,
fields: ['USERTYPE'],
proxy: {
type: 'ajax',
extraParams: {
typeName: 'USERTYPE'
},
url: 'USERTYPE.htm',
reader: {
type: 'json',
root: 'res'
}
},
listeners: {
load: function (store, options) {
var combo = Ext.getCmp('USERTYPECmbo');
combo.setValue(combo.getValue()); //Set the remote combo after the store loads.
}
}
}),
name: 'USERTYPE',
fieldLabel: 'USER TYPE'
}
指出我哪里出错或需要为组件添加任何属性。
【问题讨论】: