jquery – 如何禁用在handsontable中添加新的行/列?

首先,有一个众所周知的错误信息(无论如何都是一段很棒的代码),例如,user tezhm,official github issues list for handsontable

When selecting a cell on the last row of a table and drag-selecting below the row
into an area outside of the table,the scroll viewport is triggered causing
a malfunction of the view. This can be recreated using the demo tables.

因此,我决定完全关闭滚动条或禁用添加新的行/列.

但是如何禁用在handsontable中添加新的行/列?

或者,如何禁用滚动滚动?

解决方法

要禁用添加新行/列,请设置以下选项:
minSpareRows: 0,minSpareCols: 0

如果您使用的是上下文菜单,则可以使用以下命令禁用该功能

contextMenu: ["undo","redo"]

一个选项可能是将maxRows设置为数据中的行数,将maxCols设置为数据中的列数.注意:如果使用columns选项,则将忽略maxCols.

maxRows: data.numberOfRows,maxCols: data.numberOfColumns

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: <span id=&quot...
jQuery 添加水印 <script src="../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...