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
2815
Grid crash: Message : Index was outside the bounds of the array.
posted

Guys, the xamDataGrid occassionally throws the following exception causing my application to crash.  What exactly does this mean?

Message : Index was outside the bounds of the array.
    Source : Infragistics3.Wpf.v9.2
    Help link :
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void ValidateIndex(Int32)
    Stack Trace :    at Infragistics.Windows.Helpers.SparseArray.ValidateIndex(Int32 index)
       at Infragistics.Windows.Helpers.SparseArray.SetItem(Int32 index, Object item)
       at Infragistics.Windows.Helpers.SparseArray.set_Item(Int32 index, Object value)
       at Infragistics.Windows.DataPresenter.RecordManager.OnSourceCollectionReset()
       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)
       at Infragistics.Windows.DataPresenter.RecordManager.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 Infragistics.Windows.CollectionViewWrapper.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.ListCollectionView.RefreshOverride()
       at System.Windows.Data.CollectionView.RefreshInternal()
       at System.Windows.Data.CollectionView.Refresh()
       at OCC600.Infrastructure.Dictionary.Containers.BindableCollection`1.<>c__DisplayClassb.<OnCollectionChanged>b__4()

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello knji,

    Thank you for your post. I have been looking through it and I assume you trying to get a Record from the Records collection by its index and when that index is out of bounds you get the described exception, so I suggest you check the Count of your Records in order to see if the one you want to get exists. Please note, we are making efforts to ensure that all forum posts are answered by an Infragistics expert. We believe that the other community users may benefit as well.

    If you have any further questions feel free to ask.

Children