I found the following in an old thread that looks perfect for making he checkbox selection model behave as if CTRL is always held down. Where would I put it in Architect? I already promoted the grid to a class and have an override for the rowexpander plugin (screenshot below-below):
Checkbox Selection Override within Architect
Ext.grid.CheckboxSelectionModel.override ({
handleMouseDown : function(g, rowIndex, e){
if(e.button !== 0 || this.isLocked()){
return;
}
var view = this.grid.getView();
if(e.shiftKey && this.last !== false){
var last = this.last;
this.selectRange(last, rowIndex, e.ctrlKey);
this.last = last; // reset the last
view.focusRow(rowIndex);
}else{
var isSelected = this.isSelected(rowIndex);
if(e.ctrlKey && isSelected){
this.deselectRow(rowIndex);
}else if(!isSelected || this.getCount() > 1){
this.selectRow(rowIndex, true);
view.focusRow(rowIndex);
}
}
}
});
Thanks,
Gerry
Checkbox Selection Override within Architect
Aucun commentaire:
Enregistrer un commentaire