If you just want to change the ordering, change the DisplayIndex
property on each column.
If you want to hide/show columns (as well as reordering them), you change the contents of AllColumns
and then call RebuildColumns()
. See this FAQ
If you want to swap between various column layouts, you can use SaveState()
and RestoreState()
See this recipe