You would need to call saveState from the appropriate events.
There is columnOrder event when columns are reordered.
there is no event specifically for show/hide column. If you have been using the toolbar select list listener to show hide columns, then saveState method can be added inside that listener.