var cities=[ [1,'大港区'], [2,'静海'], [3,'宁河'], [4,'宝坻'], [5,'武清'], [6,'蓟县'] ]; var proxy=new Ext.data.MemoryProxy(cities); var City=new Ext.data.Record.create([ {name:'cid',type:'int',mapping:0}, {name:'cname',type:'string',mapping:1} ]); var reader=new Ext.data.ArrayReader({},City); var store=new Ext.data.Store({ proxy:proxy, reader:reader, autoLoad:true }); var combobox=new Ext.form.ComboBox({ renderTo:Ext.getBody(), tiggerAction:'all', store:store, readOnly:true, displayField:'cname', valueField:'cid', mode:'local', emptyText:'请选择城市....' }
第二种: var myd = new Ext.form.ComboBox({ id: 'sd_myd', typeAhead: true, triggerAction: 'all', fieldLabel: '满意度', width: 160, displayField: 'is', emptyText: i18n.ib_workerOrderRecord.all, valueField: 'id', readOnly: true, mode: 'local', store: new Ext.data.SimpleStore({ fields: ['id', 'is'], data: [['all', i18n.ib_workerOrderRecord.all], ['1', '满意'],['2','一般'],['3','不满意']] }) });
Ext.form.Combox静态下拉框的编写
最新推荐文章于 2022-11-21 10:37:34 发布