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

[Solved] Nullable DateTime column leads to converter exceptions

3 Answers 199 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Licenses
Top achievements
Rank 1
Licenses asked on 10 Nov 2010, 09:56 AM
Hello,

I have a grid with the following column in it:
<telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Date}" Width="120" DataFormatString="{}{0:dd/MM/yyyy HH:mm}"/>

Each time I click on the filter icon (standard Telerik grid filters), the following exception is shown in the output:
System.Windows.Data Error: 'MS.Internal.Data.DynamicValueConverter' converter failed to convert value '' (type 'Telerik.Windows.Data.FilterDescriptor+FilterDescriptorUnsetValue'); BindingExpression: Path='Value' DataItem='Telerik.Windows.Controls.GridView.FilterDescriptorViewModel' (HashCode=66662461); target element is 'Telerik.Windows.Controls.RadDateTimePicker' (Name=''); target property is 'SelectedValue' (type 'System.Nullable`1[System.DateTime]').. System.InvalidOperationException: Can't convert type Telerik.Windows.Data.FilterDescriptor+FilterDescriptorUnsetValue to type System.DateTime.
   bij MS.Internal.Data.DefaultValueConverter.Create(Type sourceType, Type targetType, Boolean targetToSource)
   bij MS.Internal.Data.DefaultValueConverter.Create(Type sourceType, Type targetType, Boolean targetToSource)
   bij MS.Internal.Data.DynamicValueConverter.EnsureConverter(Type sourceType, Type targetType)
   bij MS.Internal.Data.DynamicValueConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
   bij System.Windows.Data.BindingExpression.ConvertToTarget(Object value).

The filtering seems to work however, but I'd still like to get rid of this exception.

Any ideas?

Thanks,
Sodi

3 Answers, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 10 Nov 2010, 11:48 AM
Hi Sodi We,

We will fix this for the next internal build and the exception will not be thrown.

Best wishes,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Licenses
Top achievements
Rank 1
answered on 10 Nov 2010, 11:51 AM
Thanks.

Do you have any idea when the Q3 release is coming? We are wondering whether we can wait for Q3 or use the internal build...
0
Rossen Hristov
Telerik team
answered on 10 Nov 2010, 11:57 AM
Hi Sodi We,

It cannot make it for the Q3 Release, but for its first internal build which will be next week.

Kind regards,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Licenses
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Licenses
Top achievements
Rank 1
Share this question
or