Nullable DateTime column leads to converter exceptions

4 posts, 1 answers
  1. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 10 Nov 2010 Link to this post

    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
  2. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 10 Nov 2010 Link to this post

    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
  3. DevCraft banner
  4. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 10 Nov 2010 Link to this post

    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...
  5. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 10 Nov 2010 Link to this post

    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
Back to Top