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
20
'Index was outside the bounds of the array.'
posted

Hello Stefan,

I noticed this problem was raised in several posts:

https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/110150/index-was-outside-the-bounds-of-the-array/518015#518015

https://ko.infragistics.com/community/forums/t/91190.aspx



We use Infragistics 17.2.20172.1000. Sometimes (we couldn't exactly point out what was different) when modifying bounded Data, Data is not shown in the Grid and firing a propertychanged gives an exception. Our grid has multiple Layouts and we do not use threads.  Here is the StackTrace:

Index was outside of the array

  at Infragistics.Collections.SparseArray.ValidateIndex(Int32 index)
   at Infragistics.Collections.SparseArray.GetItem(Int32 index, ICreateItemCallback createItemCallback)
   at Infragistics.Windows.DataPresenter.UnsortedRecordSparseArray.GetItem(Int32 index, Boolean create, Boolean calledFromSortedManagerSparseArray, Boolean& newRowCreated)
   at Infragistics.Windows.DataPresenter.UnsortedRecordSparseArray.GetItem(Int32 index, Boolean create)
   at Infragistics.Windows.DataPresenter.DataRecordCollection.get_Item(Int32 index)
   at Infragistics.Windows.DataPresenter.DataItemRecordMap.CheckMap(Object item, Func`1 getRecord)
   at Infragistics.Windows.DataPresenter.DataRecordCollection.LoadDataItemRecordMap(DataItemRecordMap dataItemRecordMap, Boolean recursive)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.GetRecordsFromDataItems(Object[] dataItems, Boolean recursive)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.ProcessPendingSelectedDataItems()
   at Infragistics.Windows.DataPresenter.DataPresenterBase.OnSelectedDataItemChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at Infragistics.Windows.DataPresenter.XamDataGrid.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName)
   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
   at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)

   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)


Parents
No Data
Reply
  • 7555
    Offline posted

    Hello Daniela,

    I noticed that you are using base version 17.2.20172.1000 , in those post I noticed that other developer mentioned that issue was fixed in V16.2 last SR . so possible that fix was not included in the base version of 17.2.

    So I would recommend you to download the latest trial V22.2 and test your project , possibly issue could be fixed in the last service release of V17.2 as well you can test it and get last 17.2 SR from your infragistics account.

    If you can still reproduce the issue with latest V22.2 then I would need your sample for further investigation . and if find any issue then we will be able to fix in the latest , since V17.2 is no longer bug fix. You would have to upgrade to latest.

    Thank you.

Children
No Data