Maintaining indexes of Data Grid
Posted: Mon Sep 16, 2013 11:36 pm
Hi all,
I have a Data Grid in an iOS application, which can add new lines, delete any line, and sort lines. I understand that when a line is deleted, it actually removes the index of that line; so say I had 3 lines, and delete index 2, I still have index 1 and 3 even though they are now in lines 1 and 2. My problem is when I save the dgText of the Data Grid, and then reload them into the app upon launch, it resets the indexes of the data grid. Thus I now have index 1 and 2, instead of index 1 and 3. This is a problem because I have a seperate tab delimited data that refers to those indexes. And now the information is no longer synced up. Hopefully I explained that well enough, this is a question for a relative beginner, but will probably need an intermediate answer…
Thanks,
Jarren
I have a Data Grid in an iOS application, which can add new lines, delete any line, and sort lines. I understand that when a line is deleted, it actually removes the index of that line; so say I had 3 lines, and delete index 2, I still have index 1 and 3 even though they are now in lines 1 and 2. My problem is when I save the dgText of the Data Grid, and then reload them into the app upon launch, it resets the indexes of the data grid. Thus I now have index 1 and 2, instead of index 1 and 3. This is a problem because I have a seperate tab delimited data that refers to those indexes. And now the information is no longer synced up. Hopefully I explained that well enough, this is a question for a relative beginner, but will probably need an intermediate answer…
Thanks,
Jarren