|
// Grid’s cellDeselecting event function
cellDeselecting(args) {
// Cancels the cell de-selection
args.cancel = true;
} |
|
methods: {
// Grid’s load event function
onLoad() {
this.$refs.gridObj.ej2Instances.element.addEventListener('click', this.mouseClick.bind(this));
},
mouseClick(e) {
// Target element is stored
this.targetEle = e.target;
},
cellDeselecting(args) {
// Cell de-selection is cancelled only if target element and de-selecting cell element are the same
if (this.targetEle == args.cells[0]) {
args.cancel = true;
}
}
} |