2
votes

I'm using Handsontable (http://handsontable.com/). I want to keep the ability to drag the corner of a cell as I have it but I don't want the user to drag that past the table itself, thus creating more rows and/or cells.

How do I achieve this?

I've tried the following but it doesn't do anything:

allowInsertRow: false
1

1 Answers

2
votes

You can define maxRows and maxCols to have the respective maximum number of rows and columns you already pre-defined. That way, the user cannot add new rows or columns.

var hot = new Handsontable(container, {
        maxRows: 2,
        maxCols: 4
    });

Also, pay attention not to include minSpareRows option and hide the context menu.