`

Ext Combox 绑定数组值

阅读更多

 //控件
        var CountryCode = [
    ['93', 'Afghanistan(93)'],
    ['355', 'Albania (355)'],
    ['213', 'Algeria (213)'],
    ['684', 'American Samoa (684)'],
    ['376', 'Andorra (376)'],
    ['244', 'Angola (244)']
    ]

       var bottomSearch1= new Ext.form.ComboBox({
            fieldLabel: 'Country Code',
            name: 'country_code',
            forceSelection: true,
            listWidth: 200,
            store: new Ext.data.SimpleStore({
                fields: ['value', 'text'],
                data: CountryCode
            }),
            valueField: 'value',
            displayField: 'text',
            typeAhead: true,
            mode: 'local',
            triggerAction: 'all',
            selectOnFocus: true, //用户不能自己输入,只能选择列表中有的记录
            allowBlank: false,
            listeners: {
                select: function() {
                    alert(this.value);
                }
            }
        })

作者: 王德田 发表于 2011-04-01 14:32 原文链接

评论: 0 查看评论 发表评论


最新新闻:
· Spring.NET Visual Studio 2010 Extension 1.0.0(2011-04-08 08:50)
· 微软前工程师用谷歌地图建旅游搜索引擎(2011-04-08 08:49)
· 熊晓鸽:投资奇虎360回报率约50倍(2011-04-08 08:47)
· 永中科技创始人:永中office败于盗版 没输微软(2011-04-08 08:46)
· 惠普诉前高管非法窃取机密情报并提供给对手(2011-04-08 08:45)

编辑推荐:C#开发Android应用的必备——Mono for Android V1.0 发布

网站导航:博客园首页  我的园子  新闻  闪存  小组  博问  知识库

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics