Save Gridview Columns In Session

I would like to save the defined columns in a TbExtendedGridView in a session to use it for another function. But I keep getting errors because of the Closure objects.

You want to save the array that that is used to define what columns are displayed or the actual data? Hopefully you mean the array() and use the same display definitions in another view. Just make a function that returns the array() and call it from


'columns'=>$this->GridViewColumns(),

To keep with MVC, I’m not sure if it should go in the model or the controller.