在在线设计器的代码中自己去加bind,在线设计器本身是通过代码初始化的,可以在相关的js代码中加入bind事件监听,例如:
- var designer = new GC.Spread.Sheets.Designer.Designer(document.getElementById("gc-designer-container"), config, spread);
- var spread = designer.getWorkbook();
- var sheet = spread.getActiveSheet();
- sheet.bind(GC.Spread.Sheets.Events.CellChanged, function (e, info) {
- if(info.sheetArea === GC.Spread.Sheets.SheetArea.viewport){
- alert("Cell index (" + info.row + "," + info.col + ")");
- }
- });
复制代码 |