Our blazing fast Grid component built with pure JavaScript
Is there any way to re order/sort the columns themselves via code? I have tried messing with the column store a bit and overriding it manually (changing the grid.columns.data as well as trying to change the gird.columns columnStore), but I know that isn't a good way to achieve this. It also yields some strange behavior where it adds a region splitter each update. I have been perusing through the docs and haven't found anything that seems good. columnStore.move sounds promising but I am unsure of the params it wants, my guess is the entire column object, or if it's even an appropriate solution.
Thanks in advance for any help
Grid can have regions that should be considered while doing a programmatic column reorder. The best would be if you analyzed how feature ColumnReorder
does it in onDrop
method. You can set a breakpoint there and then step through the code to find out what's happening there.
The file is lib/Grid/feature/ColumnReorder.js
Is there a way to get a bit of code here? I am a current extjs customer but am evaluating your stand alone gantt for purchase and dont have the source yet. I want to make sure reordering of columns is possible via code. Thank you.
I thought that might be the way but I tried using it with no luck. I tried exactly your code and nothing moves. Is there more that needs to be done after you do the move call? I notice the category is grid, I am using the gantt but I assume it should be using the same function?
That worked for me thank you