CheckboxSelectionModel

来源:互联网 发布:全国大数据发展哪里好 编辑:程序博客网 时间:2024/05/19 10:15

Ext.override(Ext.grid.CheckboxSelectionModel, {
            onMouseDown: function(e, t) {
                if (t.className != "x-grid3-row-checker") {
                    this.clearSelections();
                }
                e.stopEvent();
                var row = e.getTarget(".x-grid3-row");
                if (row) {
                    var index = row.rowIndex;

                    if (this.isSelected(index)) {
                        if (!this.grid.enableDragDrop) {
                            if (!this.allowDeselect) {
                                return;
                            }

                            this.deselectRow(index);
                        } else {
                            this.deselectingFlag = true;
                        }
                    } else {
                        if (this.grid.enableDragDrop) {
                            this.deselectingFlag = false;
                        }

                        this.selectRow(index, true);
                    }
                }
            }
        });

原创粉丝点击