Ext js 4 boxselect在编辑表单时显示多选数据

时间:2013-02-15 07:17:46

标签: extjs extjs4 extjs-mvc

在EXTJS 4中编辑表单时,是否有任何方法可以在Boxselect xtype上加载多选数据 我正在使用

Ext.getCmp('boxselect id').setValue(5,6,7,10).

当我给单值设置值时,上面的代码正在工作,但我的条件是在编辑表单时加载多个选定的数据,因为boxselect是多选类型。

{
                                xtype : 'boxselect',
                                store : 'store',
                                name: 'attributes',
                                id: 'attributes',
                                displayField: 'name',
                                valueField: 'abbr',
                                multiSelect : true,
                                fieldLabel: 'Attribute',
                                allowBlank: false,
                                editable: true,
                                allowQueryAll : false,
                                forceSelection : true,
                                typeAhead: true,
                                triggerAction: 'all',
                                delimiter : ','
                            },

1 个答案:

答案 0 :(得分:1)

试试这个Ext.getCmp('boxselect id')。setValue([5,6,7,10])。 确保数组