首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

grid checkbox 多选有关问题. (更改为 点击条目 实现多选 )

2012-10-13 
grid checkbox 多选问题.. (更改为 点击条目 实现多选 )1. 覆盖原方法Ext.namespace(Ext.xz)Ext.xz.Che

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);}}}});

热点排行
Bad Request.