代码之家  ›  专栏  ›  技术社区  ›  Justin Johnson

带extjs的多选择组合框

  •  2
  • Justin Johnson  · 技术社区  · 15 年前

    如何将多选择组合框作为 Ext.FormPanel 使用ExtJS?我一直在寻找,但似乎找不到与最新版本的extjs兼容的解决方案( this question 类似,但没有工作/当前解决方案)。

    这是我目前为止所拥有的,但它只是一个选择:

    new Ext.FormPanel({
        labelAlign: 'top',
        frame:      true,
        width:      800,
        items: [{
            layout: 'column',
            items:[{
                columnWidth: 1,
                layout:      'form',
                items: [{
                    xtype:          'combo',
                    fieldLabel:     'Countries',
                    name:           'c[]',
                    anchor:         '95%',
                    allowBlank:     false,
                    typeAhead:      true,
                    triggerAction: 'all',
                    lazyRender:     true,
                    mode:           'local',
                    store:          new Ext.data.ArrayStore({
                        id:     0,
                        fields: ['myId', 'displayText'],
                        data: [
                            ["CA", 'Canada'], 
                            ["US", 'United States'],
                            ["JP", 'Japan'],
                        ]
                    }),
                    valueField:   'myId',
                    displayField: 'displayText'
                }]
            }]
        }]
    }).render(document.body);
    

    我没有看到任何参数 documentation 这表明这是支持的。我也发现了 this this 但我只能让他们用2号分机。

    2 回复  |  直到 15 年前
        1
  •  6
  •   Mike Sickler    15 年前

    退房 SuperBoxSelect 延伸。

        2
  •  3
  •   ob1    15 年前