Results 1 to 2 of 2

Thread: How to dynamically select items in combobox?

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Location
    Hyderbad
    Posts
    42

    Default How to dynamically select items in combobox?

    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:
    Code:
    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

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Location
    Hyderabad
    Posts
    106
    Answers
    10

    Default

    Check the below code, it is working at my end
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •