Invalid Cast Exception on Sort Descriptors

2 posts, 0 answers
  1. Tyler
    Tyler avatar
    13 posts
    Member since:
    Jun 2012

    Posted 16 Oct 2012 Link to this post

    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.
  2. Vladislav
    Vladislav avatar
    277 posts

    Posted 18 Oct 2012 Link to this post

    Hi Tyler,

    Unfortunately we wasn't able to reproduce the described issue on our side.
    I made a simple project based on the example in our Demo and it seems to work properly in the scenario described.
    Could you please try this project and let us know if you get this exception with it?

    If you encounter this exception only in your project, it will be best if you can send it to us, in order to investigate the problem. It will also be helpful for us to know the exact version of the controls you are using.

    Thank you in advance.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top