`
csg0328
  • 浏览: 9780 次
  • 性别: Icon_minigender_1
  • 来自: 西安
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

Ext.ComboBox 设置初始值

EXT 
阅读更多
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); //初始化显示
                }
            }

        })
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics