Change order of column in grid programmatically

Any ways to change the order of column or add new column in the the grid view programmatically without touching the xml, I’am trying to modify the xml through an action-method but I have to refrest the browser page .

Thank help


To change the order of grid rows, you can add the orderby attribute to the grid view.

I have attached the documentation for the grid view Grid View :: Axelor Documentation

Alternatively, you may refer to the GitHub link provided below.

If you have any other questions, please don’t hesitate to contact me.
Best regards,

I meant another thing, to add a new column in a grid without explicitly touching xml files, (Example i have two columns code_product, description and i want to add other columns. For the final users modify xml could be a little complicated.

I saw that exists « slick.columnpicker.js » as a .js library i think it might do the job but i don’t know how to use it.

I have to implement something like this.