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

Removing TimeSpan Filter from UI throws NullReferenceException

1 Answer 37 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Radiation
Top achievements
Rank 1
Radiation asked on 22 Jul 2013, 04:44 PM
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.

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 23 Jul 2013, 01:41 PM
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 >>
Tags
DataFilter
Asked by
Radiation
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or