Hi ,
i am working on Ext.ux.form.ItemSelector, using which a window appears and we have two panels, 'Available' and 'Selected' , any item in Available panel double clicked moves to Selected panel, but when item is double clicked it moves to Selected Panel as well as retained in original list of Available items for example if 'Available' Panel had two items 'a' and 'b' , if i double clicked 'a' , 'a' will be available in 'Selected' Panel but also retained in 'Available' panel, so i tried override 'moveRec' method as shown in code and it works now what i want is when i double click on item of Selected Panel they need to be removed from Selected list and it does not goes back to Available list but I am not able to do this:
Code:
Ext.define('abcd.cm.monitoring.view.Common.MonitorSelector', {
extend: 'Ext.ux.form.ItemSelector',
alias: 'widget.monitorselector',
requires: [
'Ext.ux.form.ItemSelector'
],
initComponent: function() {
var me = this;
me.callParent();
} ,
onAddBtnClick : function() {
var me = this,
selected = me.getSelections(me.fromField.boundList);
me.moveRec(true, selected);
me.toField.boundList.getSelectionModel().select(selected);
} ,
moveRec: function(add, recs) {
var me = this,
fromField = me.fromField,
toField = me.toField,
fromStore = add ? fromField.store : toField.store,
toStore = add ? toField.store : fromField.store;
fromStore.suspendEvents();
toStore.suspendEvents();
// fromStore.remove(recs);
toStore.add(recs);
fromStore.resumeEvents();
toStore.resumeEvents();
fromField.boundList.refresh();
toField.boundList.refresh();
me.syncValue();
}
});
Please help me.Thanks in advance