您好,也可以通过事件来实现:
- sheet.bind(GC.Spread.Sheets.Events.ColumnWidthChanging, function (e, info) {
- info.cancel = true;
- console.log("禁止修改列宽");
- });
- sheet.bind(GC.Spread.Sheets.Events.EditStarting, function (sender, args) {
- if (args.row < 2) {
- args.cancel = true;
- }
- console.log("前两行禁止修改");
- });
复制代码 |