SmartClient Version: v9.1d_2014-02-24/LGPL Development Only (built 2014-02-24)
I recently tried rolling from 4.0p to 4.1d and I'm having problems with the ListGrid.setViewState method. The behavior seems to have changed.
If you save off the view state of the grid while a column is visible (note that in the saved view state there is no visible attribute defined on the field, whereas with hidden fields there is a visible:false attribute saved). If you then hide the field using the dropdown menu in the grid headers, and they try to restore the view state, the column does not become visible again. If you reverse this (i.e., hide the column, save the state, show the column, restore the state), it works fine. Saving the view state and then restoring it later worked fine for toggling the visible state in 4.0.
I've attached sample code that can be used to play with this.
I'm also having another problem with this as well, my code use to set the view state (which had sort specified in it), and then call the getSort method. When I do that now, I am getting 'null' back. I've tried reproducing this in a simple example and have not been able to. I'll keep working on narrowing it down and start another thread when I have something, but if you can think of anything that might relate to this now, it would be appreciated.
I recently tried rolling from 4.0p to 4.1d and I'm having problems with the ListGrid.setViewState method. The behavior seems to have changed.
If you save off the view state of the grid while a column is visible (note that in the saved view state there is no visible attribute defined on the field, whereas with hidden fields there is a visible:false attribute saved). If you then hide the field using the dropdown menu in the grid headers, and they try to restore the view state, the column does not become visible again. If you reverse this (i.e., hide the column, save the state, show the column, restore the state), it works fine. Saving the view state and then restoring it later worked fine for toggling the visible state in 4.0.
I've attached sample code that can be used to play with this.
I'm also having another problem with this as well, my code use to set the view state (which had sort specified in it), and then call the getSort method. When I do that now, I am getting 'null' back. I've tried reproducing this in a simple example and have not been able to. I'll keep working on narrowing it down and start another thread when I have something, but if you can think of anything that might relate to this now, it would be appreciated.