I have a problem with Storing and reloading column order in a gridView. If I re-order columns and the move a column inbetween the already re-ordered columns, then the saved layout is no longer correct.
with 2 RadGridViews each with columns set as shown in file STEP1:
I have a callback on each ColumnReordered on grid 1 where I use a PersistanceManager to store the column-layout to a byte, then I use the PersistanceManager again to read the byte into grid 2. For every time I do this I first reset the columns I grid 2 by looping through the Columns selection and setting the DisplayIndex to the same order as the columns are defined in the XAML.
First, in grid 1 I move column "3" to between"1" and "2". The result in Grid 2 is as expected, see file STEP2
Then, in grid 1 I move column "5" to between "3" and "2" and get the expected result in Grid 2 when I load the layout from Grid 1 using the PersistenceManager. See file STEP3
Finally, in Grid 1 I move "X" to between "1" and "3". Grid 21 then shows 1 X 3 5 2 4 6 which is correct. But when I reset grid 2 and load the layout from grid 1 I get the results as in file STEP4
Notice here that 2 & 5 have swapped places in Grid 2. I assume this is because of the way the PersistanceManager reads and applies the layout and in what order the columns are assigned their DisplayIndex.
Can anybody explain what happens and how to get around it? We use version 2014.2, will it help to upgrade? I do not want to buy an upgrade unless I am sure this will work...