Hi,
We have a table where adding, removing, copying and pasting actions are implemented. We save whole records into DB when the save button is clicked and we also save when record is copied and pasted on to the table.
To Save and Update into DB, we need to maintain a unique ID for each rows. Here we have used cell
property to store the ID
references which are like this
[{row: 0, col: 1, row_id: 100}, {row: 1, col: 1, row_id: 101}]
The problem could be when the filter is applied, the filtered records are shown (which changes the indexes of the rows), right?
Assume, I have 3 rows for which I have 3 references in cell
array when I apply a filter for last 2 records not the first one, now it would display except first record other 2 records.
Now the filtered records are replaced with existing records so it changes the row indexes (like the second row’s record becomes the first row and third row’s record becomes the second row,
now the references we maintained is not correct in cell
property) right?
How can we overcome from this?
Or is not good way to store the row’s reference in cell
property? Is there any other way to fix this?
Please help me solve this.
Thanks in advance!