Saving data with the primary key already in the database

I’m trying to follow up this question made 3 years ago but I’m really confused with the JSFiddle provided to answer it. (with SourceRow, VisualRow and the FOR function).

I’m having the same issue as the OP and I want to use JQuery to save to the SQL database.

Can anyone help me? Thanks

Hey @CaldeiraG

here is an updated example http://jsfiddle.net/handsoncode/a9rgvne2/ (uses Handsontable 7.0.2).

You can try how it works after changing any data (with an opened console).

Thanks for the quick answer @aleksandra_budnik! I see what is going on and it works as intended.

What if I want to use a button click event instead of the afterChange function (and send multiple rows modified)?

I just want to send to the database the selected rows, not the whole table (hot.getData()) like on the tutorial on HandsOnTable docs.

Hey @CaldeiraG

here’s the getData result on a button click https://stackblitz.com/edit/angular-vdhmzo?file=src/app/app.component.ts