NullReferenceException when filtering GridTextColumn in SfDataGrid
Hi,
i have a Problem, i updated all Syncfusion Controls from 15.4.0.20 to 18.2.0.44, also tried the 18.2.0.46 Nuget package, bit i get a NullReferenceException when filtering only on GridtextColumn. Datetime and numeric columns work fine.
When i click first time in the funnel of the column, it works fine. i can open the filter, apply filters. No problem.
When i want to edit the filter or take it oud, i get the exception. Also if i just click twice on the funnel i get the exception.
It is on all projects, i am working on in all controls. this i a sample xaml(it is bound to a DataTable):
<syncfusion:SfDataGrid x:Name="_list" SelectionChanged="listSelectionChanged"
AutoGenerateColumns="False"
ColumnSizer="Auto"
NavigationMode="Row" ScrollMode="Async"
AllowFiltering="True"
ItemsSource="{Binding}"
ShowGroupDropArea="False" BorderThickness="0">
<syncfusion:SfDataGrid.Columns>
<syncfusion:GridTextColumn HeaderText="Lfd. Nr" MappingName="number" />
<syncfusion:GridTextColumn HeaderText="Jahr" MappingName="year" />
<syncfusion:GridTextColumn HeaderText="Archiv" MappingName="stor_header" />
<syncfusion:GridTextColumn HeaderText="Lfd.Nr/Archiv" MappingName="number_per_storage" />
<syncfusion:GridTextColumn HeaderText="WIE" MappingName="wie_header" />
<syncfusion:GridTextColumn HeaderText="Ordnerart" MappingName="filetype_title" />
<syncfusion:GridTextColumn HeaderText="Status" MappingName="action_title"/>
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>
And this is the exception i get
An unhandled exception just occurred: bei Syncfusion.UI.Xaml.Grid.AdvancedFilterControl.<GenerateFilterTypeComboItems>b__0(String s)
bei System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
bei Syncfusion.UI.Xaml.Grid.AdvancedFilterControl.GenerateFilterTypeComboItems()
bei Syncfusion.UI.Xaml.Grid.GridFilterControl.InitializeGridFilterPane()
bei Syncfusion.UI.Xaml.Grid.GridFilterControl.OnIsOpenPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
bei System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
bei System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
bei System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
bei System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)
bei MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
bei MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
bei MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(DependencyObject d, DependencyProperty dp, Boolean isASubPropertyChange)
bei MS.Internal.Data.ClrBindingWorker.OnSourceInvalidation(DependencyObject d, DependencyProperty dp, Boolean isASubPropertyChange)
bei System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
bei System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
bei System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
bei System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
bei System.Windows.DependencyObject.SetCurrentValueInternal(DependencyProperty dp, Object value)
bei System.Windows.Controls.Primitives.ToggleButton.OnToggle()
bei System.Windows.Controls.Primitives.ToggleButton.OnClick()
bei System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
bei System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
bei System.Windows.Input.InputManager.ProcessStagingArea()
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Any help is highly appreciated
Best
Daniel
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
VS
Vijayarasan Sivanandham
Syncfusion Team
July 24, 2020 01:37 PM UTC
Hi Daniel
Thank you for contacting Syncfusion support.
We have provided the new support DoesNotEndWith and DoesNotBeginWith for TextFilter in our Volume 4, 2019 release version (17.4.0.39). We suspect that in your sample, you are using our older resx file. So, you need to add this filter type in your resource file. Please refer to the link below.
Latest Resource File: https://www.syncfusion.com/downloads/support/forum/156314/ze/Syncfusion.SfGrid.WPF1277997429
Please let us know, if you require further assistance on this.
Regards,
Vijayarasan S
Vijayarasan S
Marked as answer
DA
Daniel
August 6, 2020 09:39 AM UTC
Thank You!!!!
I did not think about the localization.
Worked perfectly
Best
Daniel
VS
Vijayarasan Sivanandham
Syncfusion Team
August 7, 2020 05:14 AM UTC
Hi Daniel,
Thanks for the update.
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you😊.
Regards,
Vijayarasan S
SIGN IN To post a reply.