Welcome to the Xceed Community | Help
Community Search  
More Search Options

Datagrid throws unhandled exception on the DataSource clean

Sort Posts: Previous Next
  •  05-28-2010, 4:39 AM Post no. 27000

    Datagrid throws unhandled exception on the DataSource clean

    Hello,

    My Master-Detail datagrid uses ObservableCollection as the DataSource. When I call the Clear() method on the collection, an unhandled exception is triggered in the grid. The log is below. Has anyone already observed a similar behavior? Thanks!

     System.ArgumentNullException: Value cannot be null.
    Parameter name: key
       at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
       at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
       at Xceed.Wpf.DataGrid.SelectionManager.ToggleSelection(DataGridContext context, Object item, Boolean assumeInItemsCollection, Boolean& selected)
       at Xceed.Wpf.DataGrid.DataGridContext.DoToggleSelection(Object item)
       at Xceed.Wpf.DataGrid.DataGridContext.UpdateSelection()
       at Xceed.Wpf.DataGrid.DataGridContext.SetCurrent(Object item, Column column, Boolean forceFocus)
       at Xceed.Wpf.DataGrid.CurrencyManager.ChangeDataGridContextCurrentItem()
       at Xceed.Wpf.DataGrid.CurrencyManager.OnCollectionViewCurrentChanged(Object sender, EventArgs e)
       at System.Windows.Data.CollectionView.OnCurrentChanged()
       at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.ComponentModel.CurrentChangedEventManager.OnCurrentChanged(Object sender, EventArgs args)
       at System.Windows.Data.CollectionView.OnCurrentChanged()
       at Xceed.Wpf.DataGrid.DataGridCollectionViewBase.DeferCurrencyEventHelper.Dispose()
       at Xceed.Wpf.DataGrid.DataGridCollectionView.ForceRefresh(Boolean sendResetNotification, Boolean initialLoad, Boolean setCurrentToFirstOnInitialLoad)
       at Xceed.Wpf.DataGrid.DataGridCollectionView.ExecuteSourceItemOperation(DeferredOperation deferredOperation)
       at Xceed.Wpf.DataGrid.DataGridCollectionViewBase.ExecuteOrQueueSourceItemOperation(DeferredOperation deferredOperation)
       at Xceed.Wpf.DataGrid.DataGridCollectionViewBase.NotifyCollectionChanged_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at Xceed.Wpf.DataGrid.DataGridCollectionViewBase.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
       at System.Collections.ObjectModel.Collection`1.Clear()
       at TraderStation.OrderRouting.Gui.WPF.Blotter.BlotterViewModel.<ClearBlotter>b__0() in m:\SRVPARSTTD01_SFY_TX_release_view\EMP\Projects\NewGen\TraderStation\OrderRouting\TraderStation.OrderRouting\Gui\WPF\Blotter\BlotterViewModel.cs:line 109
       at Iaplus.Threading.DelegateTask.Execute() in d:\SFY\Views\SRVPAREMS6_SFY_Iaplus.Threading_release_view\ECN_COMMON\Frameworks\Iaplus\Threading\Component\DelegateTask.cs:line 40
       at Iaplus.Threading.ExceptionManager.ExecuteTask(ITask task) in d:\SFY\Views\SRVPAREMS6_SFY_Iaplus.Threading_release_view\ECN_COMMON\Frameworks\Iaplus\Threading\Component\ExceptionManager.cs:line 134
       at Iaplus.Threading.WindowsForms.NativeGuiDispatcherBase.Process() in d:\SFY\Views\SRVPAREMS6_SFY_Iaplus.Threading_release_view\ECN_COMMON\Frameworks\Iaplus\Threading\Component\WindowsForms\NativeGuiDispatcher.cs:line 96
       at Iaplus.Threading.WindowsForms.NativeGuiDispatcherBase.Control.WndProc(Message& m) in d:\SFY\Views\SRVPAREMS6_SFY_Iaplus.Threading_release_view\ECN_COMMON\Frameworks\Iaplus\Threading\Component\WindowsForms\NativeGuiDispatcher.cs:line 142
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

  •  05-28-2010, 11:44 AM Post no. 27006 in reply to 27000

    Re: Datagrid throws unhandled exception on the DataSource clean

     

    Hi Kyrylo,

    I do not reproduce your exception in a built sample based on the description of your situation. Please send us a self contained sample and the steps to execute in order to pursue the investigation of the issue. Thank you.


    Xceed - Software Developer and Technical Support
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.