I creating a new adminhtml grid, and I have found a problem with setting up columns positions.
Decrease value "sortOrder" of "name" column to 15.

The column "name" should be moved between ID and Thumbnail

Column aren't being moved.
I assume the bug is in Ui module. The file Magento/Ui/view/base/web/js/grid/listing.js contains mehtod "updatePositions" that setting up columns position by their index instead of element sortOrder. The working solution for me is replace "index" for "elem.sortOrder".

Hi @rawick ,
Thanks for catch! We will investigate issue under MAGETWO-53310 task.
Stay in touch.
@rawick could you do:
TRUNCATEui_bookmark; in scope of your MYSQL db.
Grids UI have such feature as _"Bookmarks"_. It allows to save Grid's state per user. It's ON by default. Looks like you got cached value.
@guz-anton I cleared all the caches, include this table and pub/static/ content. the problem is exactly in ignoring xml attribute "sortOrder". Yes, you can replace columns in ui_component, clear cached table and it will be ok, but attribute "sortOrder" won't has any usage anyway.
@rawick
sortOrder is used on upper level than you point. Before Grid (via listing.js) applying position some actions are done by layout.js.
On Grid level with position works Bookmark UI component. It uses component's indexes. And it expected behavior. position has other value than sortOrder.
You can find in mysql db records in ui_bookmark table. If you drop it your changes from xml will be applied.
So under "clear caches" after changing "sortOrder" in xml you should do:
ui_bookmark. E.g.:mysql -uroot -p -e 'USEmagento_db_name;TRUNCATEui_bookmark;'sudo -u www-data rm -rf var/cache/*Currently I'm closing issue as one that "Cannot reproduce".
@rawick please comment here if any additional info you'll have.
Deleting the related ui_bookmark table rows fixed this for me, but is that really the expected behaviour - to not be able to (re-)define the column order by XML or at least reset the order by clearing a cache, instead of manually editing database?
Is clearing the ui_bookmark table supposed to be built into a cache type or something in the future? It seems a little bit too devvy for someone who's just testing a new version of a ui_component...
If anyone is interested, I made a Feature Request with a proposed solution to the clearing of the ui_bookmark table that doesn't require technical DB knowledge
https://github.com/magento/community-features/issues/215
2.2.8 same issue, adding "sortOrder" attribute to
Most helpful comment
@rawick could you do:
TRUNCATEui_bookmark;in scope of your MYSQL db.Grids UI have such feature as _"Bookmarks"_. It allows to save Grid's state per user. It's ON by default. Looks like you got cached value.