PDA

View Full Version : Combobox multiselect and editable



xeni
17 Oct 2012, 4:54 AM
I am using extjs 4.0.7. I have a combobox with multiselect and editable in Ext.grid.plugin.RowEditing but after i choose one item from the list,I write something in combo and I choose another item from the list the previuos element compleated is clear and in combo apears only the last item selected. What I have to do to change this behavior?

sword-it
17 Oct 2012, 5:22 AM
Hi,

may you provide your code or screenshot for better understanding the problem

xeni
17 Oct 2012, 5:47 AM
{
header:'#{condition}',
dataIndex:'condition',
width:250,
editor:{
xtype:'combobox',
name:'condition',
allowBlank:false,
store:Ext.create('UTMS.store.combo.ComboConditions'),
queryMode:'remote',
valueField:'conditionValue',
displayField:'conditionValue',
typeAhead:true,
emptyText:'...',
editable:true,
multiSelect:true,
listConfig:{

minWidth:300

}
}
}

I select some values from combo and I change the informations from them. When I open combo and I choose another item from combo I want this last item to be added to the items compleated before. But in combo appear only the last item selected.

skirtle
17 Oct 2012, 3:31 PM
Using type ahead with multiselect isn't supported. It raises an error in 4.1 to stop you doing that, see the code here:

http://docs.sencha.com/ext-js/4-1/source/ComboBox2.html#Ext-form-field-ComboBox-method-initComponent

In general multiselect doesn't play nicely with other options, not just type ahead. It really only works well with editable set to false.

You may be able to write your own extension of combobox to do this but you're a long way away from the standard functionality with this one.