To update data, have a look at setDataAtCell
method:
setDataAtCell (row: Number, col: Number, value: Mixed, source: String (Optional))
To add new rows created on server, have a look at the alter
method:
alter ('insert_row', index: Number, amount: Number (Optional), source: String (Optional))
You can find more detailed description of those 2 methods here
So to update something that was changed on server:
$container.handsontable('setDataAtCell', rowIndex, colNumber, "New Value");
And to add new:
var rowIndex = 2; //You will need to determine this to maintain sorting, or set to null to add as last row.
var numberOfRows 1; //Only adding one row at a time
$container.handsontable('alter', 'insert_row', rowIndex, colNumber);
//After row is added you can update the values of each column using setDataAtCell as per above
$container.handsontable('setDataAtCell', rowIndex, 1, "FirstName");
$container.handsontable('setDataAtCell', rowIndex, 2, "LastName");
//One line for each column or have a look at the setDataAtCell method for alternative option
You may enocunter issues if the user is for example editing values that need updating, or what happens if you add a row while user is editing?
I hope any of this helps