您好,您这个需求没有能够直接实现的配置,需要用事件来做,参考代码:
- $(document).ready(function () {
- var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 1 });
- spread.options.showVerticalScrollbar = false;
- var sheet = spread.getActiveSheet();
- sheet.setRowCount(10);
- spread.bind(GC.Spread.Sheets.Events.RowChanged, function (sender, args) {
- var sheet = args.sheet;
- var bottomRow = sheet.getViewportBottomRow(1);
- var topRow = sheet.getViewportTopRow(1);
- if(topRow === 0 && bottomRow === sheet.getRowCount()-1){
- spread.options.showVerticalScrollbar = false;
- }else{
- spread.options.showVerticalScrollbar = true;
- }
- });
- $("#insertRow").click(function () {
- sheet.addRows(sheet.getRowCount(), 1);
- });
- });
复制代码 |