Is there some way to get the current column order in a grid?

Let’s assume I create a grid.
I add 2 Columns (column1 and column2), reorder them by hand
It displays column2, column1, but getColumns() returns column1, column2
Then I add a 3rd Column (column3).
Now it displays column1, column2 , column3 instead of column2, column1 , column3
Is there some way to now get the current column sort order? and make sure it doesn’t keep restoring the original order?

There is grid.setColumnOrder(), but no getter. And grid.getColumns() returns them in the order in which they were added (column1, column2, column3).

Do I really have to manually keep track of every column added and reordered store this state myself?


workaround… (3.73 KB)

Created, because for me it somewhat looks like a bug. And if it’s not a bug, then it’s a feature request :wink:

Both I would guess, your first part of the question from yesterday was a bug - the second part is a feature request