![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
new
Ext.form.ComboBox({
id: ' mycmb ' ,
typeAhead: true ,
triggerAction: ' all ' ,
mode: ' local ' ,
valueField: ' ID ' ,
displayField: ' Name ' ,
value: ' 5307 ' , // 设置值
store: new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
method: ' GET ' ,
url: ' GoodsList.aspx ' // 相对路径
}),
fields: [{ name: ' ID ' }, { name: ' Name ' }],
root: ' data ' ,
autoLoad: true
}),
listeners: {
render: function (cmb) {
var store = this .getStore();
store.on( ' load ' , function () { cmb.setValue(cmb.getValue()); }, this ); // 初始化显示
}
}
})
id: ' mycmb ' ,
typeAhead: true ,
triggerAction: ' all ' ,
mode: ' local ' ,
valueField: ' ID ' ,
displayField: ' Name ' ,
value: ' 5307 ' , // 设置值
store: new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
method: ' GET ' ,
url: ' GoodsList.aspx ' // 相对路径
}),
fields: [{ name: ' ID ' }, { name: ' Name ' }],
root: ' data ' ,
autoLoad: true
}),
listeners: {
render: function (cmb) {
var store = this .getStore();
store.on( ' load ' , function () { cmb.setValue(cmb.getValue()); }, this ); // 初始化显示
}
}
})