grid checkbox 多选问题.. (更改为 点击条目 实现多选 )
1. 覆盖原方法
Ext.namespace('Ext.xz'); Ext.xz.CheckboxSelectionModel =function(config) { Ext.xz.CheckboxSelectionModel.superclass.constructor.call(this,config); this.group = config.group; this.value=config.value; }; // 实现点击内容可多选Ext.extend(Ext.xz.CheckboxSelectionModel, Ext.grid.CheckboxSelectionModel,{handleMouseDown : function(g, rowIndex, e) {if (e.button !== 0 || this.isLocked()) {return;}var view = this.grid.getView();if (e.shiftKey && !this.singleSelect && this.last !== false) {var last = this.last;this.selectRange(last, rowIndex, e.ctrlKey);this.last = last; // reset the lastview.focusRow(rowIndex);} else {var isSelected = this.isSelected(rowIndex);if (isSelected) {this.deselectRow(rowIndex);} else if (!isSelected || this.getCount() > 1) {this.selectRow(rowIndex, true);view.focusRow(rowIndex);}}}});