Move column
Grid DisplayOptions.columnMovable is true, and if the movable of the column is true, at run time, the user can change the position of the column by dragging the column header. Additionally, you can change the position of a column with JavaScript code using the displayIndex property of the column.
Setting whether all columns can be moved
Setting DisplayOptions.columnMovable to false will prevent the user from moving all columns.
gridView.displayOptions.columnMovable = false;
gridView.displayOptions.columnMovable = true;
Specifies whether to move a specific column
Let's specify whether the product number can be moved.
gridView.columnByName("ProductId").movable = false;
gridView.columnByName("ProductId").movable = true;
Change location with javascript
You can change the position of a column with JavaScript code using the vindex property of the column layout. As an example, let's send the position of the product number column to the front.
gridView.layoutByColumn("ProductId").vindex = 0;