Deleting a row and adding a new one results in duplicate rowIndex
Deleting a row and adding a new one results in duplicate rowIndex
mooseburger
Posts: 6Questions: 3Answers: 0
If I use the API to remove a row through a remove link in that row, like this:
createdCell: function (cell, cellData, rowData, rowIndex, colIndex) {
$(cell).find("a").click(function () {
table.row($(cell).parent()).remove().draw();
return false;
});
}
it works. However, in this table, I can add and delete rows. If I have three rows, with rowIndexes 0, 1, and 2, and I delete row 0 and add another row, the new row will have index 2. So I end up with with two rows with index 2. Any way around this? I really would like it if I could have unique row indexes. Mainly, I need a unique identifier for a row, that I can access on column().render.
This discussion has been closed.