2

I am in a situation where I need to be able to remove/hide columns dynamically. I found what I think should do the trick in the Methods section in the handsontable documentation. But have I have not been able to get it to work. I keep getting an error that says "Uncaught Error: cannot remove column with object data source or columns option specified".

I am trying to use the "alter" method with "remove_col" to remove the column.

$("#EFTable").handsontable('getInstance').alter('remove_col', 3)

Here is a sample of the code I am working with in JSFiddle.

Any suggestions on how to make this work or an other direction to get the job done would be appreciated.

4

1 回答 1

4

今天早上我又看了一遍,发现答案就在我面前。错误消息告诉我“无法删除指定了对象数据源或列选项的列”。第二部分是答案。

我正在使用“列”选项来控制每一列的功能。使用 columns 选项时,不能使用 remove_col 方法。

于 2013-08-27T14:14:23.190 回答