I have an application that updates each cell value on the same row through a loop. In order to have data transaction type as "row" instead of "cell", I use igGridUpdating updateRow to update value. If the code does not explicitly call “commit” every time after updateRow or set autoCommit false, the second updateRow does not recognize the update by previous updateRow call.
// first, update Value from 1 to 100
$('#grid1').igGridUpdating('updateRow', 1, { Value: 100 });
// second, update Name from 'Train' to 'New Train'
$('#grid1').igGridUpdating('updateRow', 1, { Name: 'New Train' });
I attached a sample where “Update row” call twice updateRow. Any solution/suggestion?
Thanks,
Michael
Hi Michael,
I would advise against doing the update in this particular way - the behavior you observe is by design, because if you don't "commit" (which applies locally), the next time you want to update a row, and you don't supply all values, the "default" ones are taken from the current (committed) row contents.
If you need to use updateRow, My suggestion is to get all cell values that you want to update first, set them in a single object, and then do one single call to updateRow.
Hope it helps. Thanks,
Angel
Hi Angel,
Thanks for the reply which is helpful.