System.FormatException while dragging column

5 posts, 0 answers
  1. Thomas
    Thomas avatar
    10 posts
    Member since:
    Jun 2015

    Posted 11 Nov 2016 Link to this post

    Hi,
    I need some help on an issue with the RadGridView.

    In my grid I have a status column and some text columns.

    The status column has a binding to an enum with 4 values and a cellstyle to get displayed a status image.

    When I have the FilteringMode set to FilterRow and the filter field of the text column contains some text I get a System.FormatException while dragging the status column over this text column saying that the value from the filter field is not a valid value for the status column.
    But why will try the grid to set filter values from one column to another?
    Any suggestions how to get this fixed?
    Many thanks for all tips.

    Cheers,

      Thomas

  2. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    665 posts

    Posted 15 Nov 2016 Link to this post

    Hi Thomas,

    Thank you for the StackTrace provided. However, I was not able to replicate the scenario you report. Generally, if a GridViewDataColumn is bound to an enum property of the underlying object and the FilteringMode is set to FilterRow, the FieldFilterControl would be a RadComboBox with each possible enum value as items. Have you applied some additional modifications at you end? Would it be possible to provide a sample?

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
  3. Thomas
    Thomas avatar
    10 posts
    Member since:
    Jun 2015

    Posted 17 Nov 2016 Link to this post

    Hi Stefan,

    I've created a demo application where I'm still able to reproduce the error.

    Enter a 'test' into the filter row field of the 'Item' or 'Text' column and drag the 'Status' column over them.

    I was also able to get this erro when dragging the 'Item' or 'Text' column over the 'Status' column.

    I also get the error when removing the ReorderColumnsMode line, but not as often.

    Best regards,

      Thomas

  4. Thomas
    Thomas avatar
    10 posts
    Member since:
    Jun 2015

    Posted 17 Nov 2016 in reply to Thomas Link to this post

    Sorry for renaming the zip, but else I was not allowed to upload :-(
  5. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    665 posts

    Posted 22 Nov 2016 Link to this post

    Hello Thomas,

    Thank you for the sample project. Indeed, I was able to replicate the behavior. Subsequently, I have logged it as a bug in our internal system. You can follow the progress of the item on the following link from our Ideas & Feedback portal - [FilterRow] Format Exception is thrown when swapping column bound to enum with a filtered column bound to string. I have added 1000 points to your account for reporting the issue.

    As a workaround, I suggest you set the IsReorderable property of the enum column to False.

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Telerik UI for WPF is ready for Visual Studio 2017 RC! Learn more.
Back to Top