Hi Telerik support team,
I’m strugling with filtering a special case in the wpf gridview. Let me explain..
I’ve a mainViewModel with an ObservebleCollection of type SubViewModel. Each subViewModel is a row in the grid. In the subViewModel I’ve a float property which is bound to a column through a valueConverter. The float (a representation of millimeters in the metric system) gets converted to inches in the imperial system. Inches can contain characters which are not supported by float (like /, - etc.) That’s why I use a converter to change it into a string. The converter works correct, also the convert back. I get a correct float value setted in my subViewModel.
The issue I walk into is when I filter the column. The filter mechanism seems to set a value in a fieldFilterControlViewModel and I get an error when I filter.
Can I change this behaviour? I would be nice that the filtervalue gets through the convertBack first and then apply the filter. So a converter on the filter inputvalue. Or, filtering directly on the showed values in the grid would also be ok.
Please help me out of this.
System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Value; DataItem='FieldFilterControlViewModel' (HashCode=31636323); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String') FormatException:'System.FormatException: Input value was not in a correct format.at Telerik.Windows.Controls.GridView.FieldFilterControlViewModel.set_Value(Object value)'