您好,
可以使用CellClick事件,参考以下代码- activeSheet.bind(GcSpread.Sheets.Events.CellClick, function (sender, args) {
- if(args.sheetArea === GcSpread.Sheets.SheetArea.colHeader){
- console.log("The column header was clicked.");
- }
- if(args.sheetArea === GcSpread.Sheets.SheetArea.rowHeader){
- console.log("The row header was clicked.");
- }
- if(args.sheetArea === GcSpread.Sheets.SheetArea.corner){
- console.log("The corner header was clicked.");
- }
- console.log("Clicked column index: " + args.col);
- console.log("Clicked row index: " + args.row);
- });
复制代码 |