Issue with Load SortSettings from database to DataTables
Issue with Load SortSettings from database to DataTables
Hello,
i have a new problem with sorting arrows.
Saving information about Direction sort and Column id from grid worked fine.
This is the numeration of indexes Grid :
0 | 1 | 2 |3 | 4 |
When id of my columns are sorted in the same way as Grid, and if i load next time datatables, values and arrows load fine.
Issue is, when i change position of columns for example:
Now i try to sort colums by MycolumnId= 0, well i click on Gridindex = 1 and sort direction = 'asc', and save changes in db.
Grid indexes: 0 | 1 | 2 |3 | 4 |
My column id: 1 | 0 | 2 |3 | 4 |
Next time when i try load values from db into Grid, I have physically sorting values by column id = 0 and sort direction = 'asc', but arrows and backlight is in column where Grid values = 0.
This is not the case, because when i have next story as:
Sort colums by MycolumnId= 0, well i click on Gridindex = 2 and sort direction = 'asc', and save changes in db.
Grid indexes: 0 | 1 | 2 |3 | 4 |
My column id: 1 | 2 | 0 |3 | 4 |
When i load values from db into Grid, I have physically sorting values by column id = 0 and sort direction = 'asc', but arrows and backlight is in column where Grid values =1.
Does anyone have a any idea?
Thanks, Matys