Multiselect combobox with ExtJs

▼魔方 西西 提交于 2019-12-21 21:22:21

问题


How do you implement a multiselect combobox as part of a Ext.FormPanel using ExtJs? I've been looking, but can't seem to find a solution that is compatible with the latest version of ExtJs (this question is similar, but doesn't have a working/current solution).

This is what I have so far, but it's a single select:

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);

I didn't see any parameters in the documentation that suggests that this is supported. I also found this and this but I could only get them working with Ext 2.


回答1:


Check out the SuperBoxSelect extension.




回答2:


Check out Saki's Ext.ux.form.LovCombo



来源:https://stackoverflow.com/questions/2979989/multiselect-combobox-with-extjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!