How to implement custom fields to display in the gridField?

I want to implement a user-defined feature that allows specific fields to be displayed and the order to be adjusted.

For example, I currently have 5 columns(column 1-5) in readonly grid, and the user can present 3 of them as needed and can adjust the order, e.g. display [column 1, column 5, column 3].

Is there any way to implement this feature? Can you give me some advice?

  Discussion posts and replies are publicly visible