To demonstrate this problem, create an NxGrid with four columns, with headers "First", "Second", "Third", and "Fourth". Fill in some rows with arbitrary data. Use the mouse to drag column "Fourth" to the first position. Then use the mouse to drag column "Third" to the second position so that the column headers now read "Fourth", "Third", "First", "Second". Perform a SaveToRegistry. Close the program, and restart it. Create the original NxGrid again, and perform a LoadFromRegistry. The columns will now show as "Fourth", "First", "Third", "Second".
I have attached code that demonstrates this problem. It is easy to reproduce.
I believe that the fix to this problem involves processing the saved registry information in a different order - rather than reading the original columns and setting each one to its new position, read the column order information from the registry, and then set the new column positions in increasing order of the New positions rather than the Old positions.












