Search code examples
jqueryhandsontable

Can I add row in handsontable by "insert" key.?


I want to add a row in handsontable by "insert" key. is it possible to add row by a key.


Solution

  • Yes, you can. What you need to do is first capture the "insert" key event. You then call on your handsontable instance and use the alter ('insert_row', index, amount) where index is the position you want (set it to 0 to add to the top, for example), and amount is how many empty rows.

    That should be it.