PDA

View Full Version : How to dynamically select items in combobox?



Manoj Parida
14 Apr 2014, 1:56 AM
Hi All,

In combobox mentioned as multiSelect:true.
Manually when selected it is working fine,but if i dynamically select multiple values last selected item is displayed.

Code is:

var val = [1,2,3];//id
newval =val.split(',');
if(!Ext.isEmpty(newval) && newval.length >= 1){
for(i=0;i<newval.length;i++){
var rec = Ext.getCmp('mycombo').getStore().findRecord('fid',newval[i]);


Ext.getCmp('mycombo').select(rec);
}
}
selected only last record.

Anyone have idea to show all selected items ,please share.

Thanks
Manoj Parida

Zinnia
14 Apr 2014, 3:42 AM
Check the below code, it is working at my end