2025年EXT3.4关于Grid锁定指定列固定多选框的实现

EXT3.4关于Grid锁定指定列固定多选框的实现1 1 创建 CheckboxSele 对象 1 新建空的 EOS6 3 的工程 新建 com towngas tcis gridlock 构件包 2 在 com towngas tcis gridlock 构件包的 展现 节点下的 页面资源 节点中创建一个文件夹 命名为 gridlock

大家好,我是讯享网,很高兴认识大家。

1.1  创建CheckboxSelectionModel对象

1,新建空的EOS6.3的工程,新建com.towngas.tcis. gridlock构件包;

2,在com.towngas.tcis.gridlock构件包的“展现”节点下的“页面资源”节点中创建一个文件夹,命名为gridlock;

3,在新建的文件夹中创建gridlockUi.js文件,gridlockEv.js文件。

4,在gridlockUi.js文件中创建对象:

var smLock = new Ext.grid.CheckboxSelectionModel({

singleSelect : false,

                              handleMouseDown : function(g,rowIndex, e) {

                                          if(e.button !== 0 || this.isLocked()) {

                                                 return;

                                          }

                                          varview = this.grid.getView();

                                          if(e.shiftKey && !this.singleSelect

                                                        &&this.last !== false) {

                                                 varlast = this.last;

                                                 this.selectRange(last,rowIndex, e.ctrlKey);

                                                 this.last= last;

                                                 view.focusRow(rowIndex);

                                          }else {

                                                 varisSelected = this.isSelected(rowIndex);

                                                 if(isSelected) {


讯享网

                                                        this.deselectRow(rowIndex);

                                                 }else if (!isSelected || this.getCount() > 1) {

                                                        this.selectRow(rowIndex,true);

                                                        view.focusRow(rowIndex);

                                                 }

                                          }

                                   },

                                   isLocked: Ext.emptyFn,

                                   initEvents: function() {

                                          Ext.grid.CheckboxSelectionModel.superclass.initEvents

                                                        .call(this);

                                          this.grid.on('render',function() {

                                                               varview = this.grid.getView();

                                                               view.mainBody.on('mousedown',

                                                                             this.onMouseDown,this);

                                                               Ext.fly(view.lockedInnerHd).on('mousedown',

                                                                             this.onHdMouseDown,this);

                                                        }, this);

                                   }

                     });

小讯
上一篇 2025-02-05 20:07
下一篇 2025-04-04 12:55

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/123479.html