I have seen many posts about this. Some suggest to rebind the grid or update the data-id cell thru script like RebindGrid as follows
//update new id to new row function rebindGrid(data) { if (typeof data.id != 'undefined') { grid.igGridUpdating("setCellValue", recOldID, "id", parseInt(data.id)); $("#ba_addresses > tbody > tr[data-id='" + recOldID + "']").attr("data-id", data.AddressKey); grid.data("igGrid").dataSource.commit(); grid.data("igGrid").dataSource.allTransactions().length = 0; } } });
But Isn't there any other way fro solving this issue? Isn't there any update done to resolve it.
Hello Ashwini,
This behavior can be achieved by handling the generatePrimaryKeyValue event. Within this event, the value contained within ui.value will correspond to the primary key of the newly added row.
Let me know if you have any further questions.