同理,只要将getViewportTopRow改成getViewportLeftColumn、将TopRowChanged改成LeftColumnChanged即可
- // 禁止滚动
- var letcol = sheet.getViewportLeftColumn(1);
- sheet.bind(GC.Spread.Sheets.Events.LeftColumnChanged, function (sender, args) {
- sheet.showColumn(letcol);
- });
- // 解除禁止滚动
- sheet.unbind(GC.Spread.Sheets.Events.LeftColumnChanged);
复制代码 |