Posted 26 September 2019, 11:33 pm EST
Hi Teenu,
Since is an element, you may add a click event just like with any other element:
<wj-flex-sheet (click)="onClick($event)" #fSheet (initialized)="fSheetInit(fSheet)">
</wj-flex-sheet>
And to get the current cell and row data, you may use the hitTest method of FlexSheet:
onClick(e) {
let hti = this.fSheet.hitTest(e);
if(hti.panel === this.fSheet.cells) {
let row = this.fSheet.rows[hti.row], col = this.fSheet.columns[hti.col];
let dataItem = row.dataItem;
let currentCellData = this.fSheet.getCellValue(row.index, col.index, false);
}
}
You may refer to the sample below:
https://stackblitz.com/edit/angular-q9gumu
Regards,
Ashwin
API: