在ExtJS 3.3.1中,我尝试将comboBox设置为多选,但它不起作用。
请帮忙。
var mArray = new Array("ALL", "AAA", "BBB");
var mCombo = new Ext.form.ComboBox({ id: 'ID', fieldLabel: 'ID',
triggerAction: 'all',
height: 100, width: 163,
multiSelect: true,
store: mArray
});
Ext.getCmp('mCombo').setValue("ALL");
答案 0 :(得分:9)
multiSelect
中没有Ext.form.ComboBox
之类的配置选项
要获得所需的功能,您需要自己开发多选组合框或使用现有替代方案之一,例如Ext.ux.form.CheckboxCombo,Ext.ux.form.SuperBoxSelect和Ext.ux.form.LovCombo。
答案 1 :(得分:-1)
return new Ext.form.ComboBox({
fieldLabel: fieldLabel,
hiddenName: name,
store: store ,
valueField:'value',
displayField:'value',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Select '+fieldLabel+' ...',
selectOnFocus:true,
allowBlank:allowBlank,
forceSelection : true,
disabled:disabled,
multiSelect:true,
width:200,
id:id,
listeners:{
change : function( frm, newValue, oldValue ) {
doRenderTL();
}
},
renderTo: Ext.get( renderTo )
});