Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
igGrid - transaction type is changed when new id is set
posted

Hi,

I am using igGrid with auto commit option set to false in my MVC project. My problem is when I edited the row and then I'll add new row with new row id. Because of that, when I try to save data in my controller, transaction type for both transaction is set to "newrow" (instead "row" for first and "newrow" for another).

I researched it and I found out that transaction type for row which was only edited is changed to "newrow" immediately after I set new id for new row by:

$("#grid").on("iggridupdatinggenerateprimarykeyvalue", function (event, ui) {

   ui.value = as.getNextRowId("#grid");

});

Same problem when I delete row and then I add new row. The transaction type for deleted row is changed from "deletedrow" to "newrow".

Steps to recreate issue:

1. Edit existing row

2. Add new row and set new id

3. Investigate dataSource.allTransactions() for grid