了解了,那么无法选择被保护的单元格是否可以满足您的需求呢?比如监听SelectionChanging事件来实现:
- sheet.bind(GC.Spread.Sheets.Events.SelectionChanging, function (e, info) {
- console.log(info);
- if (sheet.getCell(info.newSelections[0].row, info.newSelections[0].col).validator()) {
- sheet.setSelection(info.oldSelections[0].row, info.oldSelections[0].col, 1, 1);
- }
- });
复制代码 |