I am working on an application and using the Persistence Framework to save the settings of the Gridview I am using. I have the code from your demos in place and everything seems to work except I continue to get an InvalidCastException on the ColumnSortDescriptors when I save the seetings only in certain situations. If I group one column then save the settings the application will throw the exception, however, if I only change the sort of one column and save then everything saves perfectly and the exception is not thrown on the same line of code. Any help would be greatly appreciated. I will attach a picture of the exception to the post.