If I have a grid contains some rows for example row_1, row_2, row_3 and I modify the row_3’s datas by calling grid.data.update() before grid.data.saveData() is called, then only row_3 will be send to server but grid.data.getLength() still returns 3.
I’m not seeing a saveData function for the DataCollection API, but the save() function says that it will send “changed” data to the server. I would guess that by using update() to change row_3, it sets the “changed” flag on row_3.
It seems like maybe instead you want to send all the rows of the grid at once; I don’t think the Grid component does that by default. It sends individual row data to minimize the data being sent in the request. If you want to send the entire table, you should probably use the serialize() function to send the table data as a single json object. Maybe something like this:
var obj = grid.data.serialize("json");
dhx.ajax.post("/path/to/processor",obj).then(function(data){
// do something here if desired
}).catch(function(error){
console.log(error);
});
Ok, I get it. Yes I wanna send the whole grid, thank you.