Get removed rows data from data source with afterRemoveRow

Tags: #<Tag:0x00007fee2715ee20>

Hi,

I am trying to implement following functionality with Handsontable:

  • When user remove single or multiple rows, I want to insert the data of those rows into database.

Is there any way to get removed rows data from data source with afterRemoveRow or is there any other way?

Thanks.

Hi @sam

I think it’s a similar issue to yours: beforeRemoveRow, I need send the data to server and wait the response

As it’s stated there, you should rather use beforeRemoveRow.

Hi @adrian.szymanski,

Thanks for the quick reply.

I want an array of data only of removed rows from the whole data source. Can we get that array with beforeRemoveRow ?

Thanks.

Hi

If you want to get just an array of the data with removed rows, then you can indeed use afterRemoveRow, and get the array by using getData() method, like here:

https://jsfiddle.net/aszymanski/rj53hpzs/

Hi @adrian.szymanski,

I found the solution to the query.

Thanks for the help.

Hi @sam

You’re welcome. I will close this topic then.

1 Like