Hello,
We are experiencing a strange behaviour of RadGridView set as a self referencing hierarchy when used with Excel filters.
Once we use predefined filter values (both, build-in and custom defined by us) the filter icon is highlitghted when none of the filter is marked. This higlight can be removed when clear filters button of filter popup is used or FilterDescriptors are cleared. If we do not clear the filters manually, and, for instance, sort grid column the application crashes with internal error of the grid. Error reads Object reference not set to an instance of object.
Attached movie will explain it better. I have also attached a ver simple sample project with data (which does not make sense, just for visualisation) that should fail when you repeat steps described above (turn today or last 7 days filter, apply, select no filter, apply and try to sort the same column).
Is there a workaround or specific conditions we need to apply to have it working?
Thanks for your advice.
I'm also attaching errors details:
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of object. /this message comes in Polish, translated
Source=Telerik.WinControls.GridView
StackTrace:
at Telerik.WinControls.UI.GridViewTemplate.PerformHierarchyFilter(GridViewRowInfo rowInfo)
at Telerik.WinControls.Data.RadCollectionView`1.PassesFilter(TDataItem item)
at Telerik.Collections.Generic.HybridIndex`1.GetFilteredItems(IEnumerable`1 e)
at Telerik.Collections.Generic.HybridIndex`1.PerformWithQuickSort()
at Telerik.Collections.Generic.HybridIndex`1.Perform()
at Telerik.Collections.Generic.HybridIndex`1.get_Items()
at Telerik.Collections.Generic.Index`1.get_Count()
at Telerik.WinControls.Data.GroupBuilder`1.get_Groups()
at Telerik.WinControls.Data.SnapshotCollectionView`1.get_Groups()
at Telerik.WinControls.UI.GridViewInfo.LoadHierarchicalData(GridViewHierarchyRowInfo parent, ICollectionView`1 sourceView)
at Telerik.WinControls.UI.GridViewInfo.Refresh()
at Telerik.WinControls.UI.GridViewInfo.get_ChildRows()
at Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
at Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
at Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(GridViewEvent gridEvent, Boolean postUI)
at Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(Object sender, DataViewChangedEventArgs args)
at Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
at Telerik.WinControls.UI.MasterGridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
at Telerik.WinControls.UI.GridViewTemplate.CollectionView_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.RadCollectionView`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.WinControls.Data.RadDataView`1.RebuildData(Boolean notify)
at Telerik.WinControls.Data.RadDataView`1.RefreshOverride()
at Telerik.WinControls.Data.RadDataView`1.OnNotifyPropertyChanged(PropertyChangedEventArgs e)
at Telerik.WinControls.Data.RadCollectionView`1.OnNotifyPropertyChanged(String propertyName)
at Telerik.WinControls.Data.RadCollectionView`1.sortDescriptors_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.Collections.Generic.NotifyCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.WinControls.UI.GridViewSortDescriptorCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.Collections.Generic.NotifyCollection`1.InsertItem(Int32 index, T item)
at Telerik.WinControls.Data.SortDescriptorCollection.InsertItem(Int32 index, SortDescriptor item)
at Telerik.WinControls.UI.GridViewSortDescriptorCollection.InsertItem(Int32 index, SortDescriptor item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at Telerik.WinControls.UI.GridViewColumn.Sort(RadSortOrder sortOrder, Boolean multiSortMode)
at Telerik.WinControls.UI.GridHeaderCellElement.Sort(RadSortOrder sortOrder)
at Telerik.WinControls.UI.GridHeaderRowBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.BaseGridBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.RadGridView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at Telerik.WinControls.UI.RadGridView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at bindingListEx_celLike.My.MyApplication.Main(String[] Args) in :line 81