This is a migrated thread and some comments may be shown as answers.

System.FormatException while dragging column

4 Answers 51 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 11 Nov 2016, 08:58 AM

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

4 Answers, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 15 Nov 2016, 03:35 PM
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!
0
Thomas
Top achievements
Rank 1
answered on 17 Nov 2016, 03:42 PM

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

0
Thomas
Top achievements
Rank 1
answered on 17 Nov 2016, 03:43 PM
Sorry for renaming the zip, but else I was not allowed to upload :-(
0
Stefan Nenchev
Telerik team
answered on 22 Nov 2016, 12:34 PM
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 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.
Tags
GridView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or