Ext MultiSelect实现双击删除

 listeners :{dblclick:function(){
   var selectObj=msForm.getForm().findField('multiselect');
      var selectionsArray = selectObj.view.getSelectedIndexes();
            var records = [];
            if (selectionsArray.length > 0)
      {
              for (var i=0; i<selectionsArray.length; i++)
     {
                record = selectObj.view.store.getAt(selectionsArray[i]);
                records.push(record);
     }
            }
            for (var i=0; i<records.length; i++)
      {
                 record = records[i];
                 selectObj.view.store.remove(record); 
            } 
     }}

你可能感兴趣的:(ext)