Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Xamdatagrid exception while delete a record from grid
posted

Hi,

         I have binded a collection with xamdatagrid in which there is a delete button to delete the records by passing selected row index in command parameter. The strange thing is   that the functionality was working fine while we were using  Infragistics dlls 11. 2 version. But there is ''Object reference not set to an instance of an object'' exception is coming  from when new Infragistics dlls 15.2 version updated. Following details of exception are

  at Infragistics.Windows.DataPresenter.RecordManager.RemoveRecordHelper(Int32 index)
   at Infragistics.Windows.DataPresenter.RecordManager.OnSourceCollectionAddOrRemove(NotifyCollectionChangedEventArgs e)
   at Infragistics.Windows.DataPresenter.RecordManager.OnBindingListChanged(Object sender, ListChangedEventArgs e)
   at Infragistics.Windows.DataPresenter.RecordManager.ProcessChangeNotification(Object sender, Object eventArgs)
   at Infragistics.Windows.DataPresenter.RecordManager.OnChangeNotification(Object sender, Object eventArgs, Boolean isReset, Boolean isCellChangeNotification)
   at Infragistics.Windows.DataPresenter.RecordManager.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
   at System.Windows.WeakEventManager.ListenerList.DeliverEvent(Listener& listener, Object sender, EventArgs args, Type managerType)
   at System.Windows.WeakEventManager.ListenerList.DeliverEvent(Object sender, EventArgs args, Type managerType)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at Infragistics.Windows.Helpers.BindingListChangedEventManager.OnListChanged(Object sender, ListChangedEventArgs e)
   at System.ComponentModel.BindingList`1.OnListChanged(ListChangedEventArgs e)
   at System.ComponentModel.BindingList`1.FireListChanged(ListChangedType type, Int32 index)
   at System.ComponentModel.BindingList`1.RemoveItem(Int32 index)
   at System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index)

Thanks

Sonia

Parents
  • 20
    Offline posted

    Hi,

    I upgraded to the latest version and I face this issue. Is there a fix for it yet?

    Here is my stack trace

    System.NullReferenceException: Object reference not set to an instance of an object.
       at Infragistics.Windows.DataPresenter.RecordManager.RemoveRecordHelper(Int32 index)
       at Infragistics.Windows.DataPresenter.RecordManager.OnSourceCollectionAddOrRemove(NotifyCollectionChangedEventArgs e)
       at Infragistics.Windows.DataPresenter.RecordManager.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at Infragistics.Windows.DataPresenter.RecordManager.ProcessChangeNotification(Object sender, Object eventArgs)
       at Infragistics.Windows.DataPresenter.RecordManager.OnChangeNotification(Object sender, Object eventArgs, Boolean isReset, Boolean isCellChangeNotification)
       at Infragistics.Windows.DataPresenter.RecordManager.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.ListenerList.DeliverEvent(Listener& listener, Object sender, EventArgs args, Type managerType)
       at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
       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.RemoveItem(Int32 index)
       at System.Collections.ObjectModel.Collection`1.Remove(T item)

    Thanks!

Reply Children