Removing TimeSpan Filter from UI throws NullReferenceException

2 posts, 0 answers
  1. Radiation
    Radiation avatar
    13 posts
    Member since:
    Jul 2012

    Posted 22 Jul 2013 Link to this post

    Hi,

    I have a RadDataFilter whose Source property is bound to ObservableCollection and AutoGenerateItemPropertyDefinitions is set to false:

                <telerik:RadDataFilter Name="radDataFilterSessions" Margin="-15,0,0,0"
                                   MaxWidth="600" AutoGenerateItemPropertyDefinitions="False"
                                   Source="{Binding DomainContext.Sessions}">
                </telerik:RadDataFilter>
                
    Properties to filter are manually defined:
                
                radDataFilterSessions.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("Name", typeof(string), "Name"));
                radDataFilterSessions.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("Description", typeof(string), "Description"));
                radDataFilterSessions.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("Recorded", typeof(DateTime), "Recorded"));
                radDataFilterSessions.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("Duration", typeof(TimeSpan), "Duration"));
                
    There seems to be problem with Duration (TimeSpan) property. I can add filter item with this property. I can change value and filter, but when I try to remove this filter item (remove a filter by using RadDataFilter's UI remove button), I got NullReferenceException:

    at Telerik.Windows.Controls.Data.DataFilter.FilterEditorFactory.TimeSpanEditorConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\DataFilter\Editors\FilterEditorFactory.cs:line 256
       at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.Activate(Object item)
       at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
       at System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
       at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
       at MS.Internal.Data.DataBindEngine.Run(Object arg)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       
       
    No problems with String and DateTime properties. I am using 2013.2.611.45 build.
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 23 Jul 2013 Link to this post

    Hi,

    We have fixed this issue right away. It will be working properly with the next Latest Internal Build.

    Regards,
    Rossen Hristov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top