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
925
System.ArgumentOutOfRangeException: Index was out of range
posted

Hi,

I've experienced today an out-of-range exception when reloading treeview and assigning selected value. Here is a stack trace:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at System.Collections.ObjectModel.Collection`1.System.Collections.IList.get_Item(Int32 index)
   at Infragistics.DataManagerBase.GetRecord(Int32 recordIndex)
   at Infragistics.Controls.Menus.NodesManager.GetDataItem(Int32 index)
   at Infragistics.Controls.Menus.NodesManager.Infragistics.IProvideDataItems<Infragistics.Controls.Menus.XamDataTreeNode>.GetDataItem(Int32 index)
   at Infragistics.Collections.BindableItemCollection`1.GetItem(Int32 index)
   at Infragistics.Collections.CollectionBase`1.System.Collections.Generic.ICollection<T>.CopyTo(T[] array, Int32 arrayIndex)
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Infragistics.Controls.Menus.NodesManager.LoadItemNodeMap(DataItemNodeMap dataItemNodeMap, Boolean recursive, XamDataTreeNodesCollection nodes)
   at Infragistics.Controls.Menus.NodesManager.LoadItemNodeMap(DataItemNodeMap dataItemNodeMap, Boolean recursive, XamDataTreeNodesCollection nodes)
   at Infragistics.Controls.Menus.NodesManager.LoadItemNodeMap(DataItemNodeMap dataItemNodeMap, Boolean recursive, XamDataTreeNodesCollection nodes)
   at Infragistics.Controls.Menus.NodesManager.LoadItemNodeMap(DataItemNodeMap dataItemNodeMap, Boolean recursive, XamDataTreeNodesCollection nodes)
   at Infragistics.Controls.Menus.XamDataTree.GetNodesFromItems(Object[] items, Boolean recursive)
   at Infragistics.Controls.Menus.XamDataTree.ProcessPendingSelectedDataItems()
   at Infragistics.Controls.Menus.XamDataTree.SetSelectedDataItemsExternal(Object[] newItems)
   at Infragistics.Controls.Menus.XamDataTree.OnSelectedDataItemsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.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.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Infragistics.Controls.Menus.XamDataTree.set_SelectedDataItems(Object[] value)
   at Eaf.Client.Mango.Navigation.Operations.HostTreeView.<>c__DisplayClass4_0.<OnSelectItems>b__0() in C:\_PROJECTS\MIT_EAF_Maintenance\EAF Mango\v2.x_Maint\Implementation\MangoNavigation\Operations\HostTreeView.xaml.cs:line 73

Our method is just assigning the selected node value:

						HostTree.SelectedDataItems = e.SelectItems;

I am using v2018.2 but planning to upgrade soon to v2019.1 due other bugfix. Possibly this problem relates to case 'CAS-200703-L7W0R0' which state I don't see if was released.

Parents
No Data
Reply
  • 7535
    Offline posted

    Hello Tomas,

    Thank you for the posting. The bug ‘261431’ attached with the case CAS-200703-L7W0R0 is still in ‘Review’ state, we will send you the email notification when the bug is fixed and ready to use.

    You can also view the status of the development by selecting the "Development Issues" tab when viewing the case on the Infragistics web site.

    If you feel that this issue is some how related to 261431 Issue then I can try to reproduce the error using the sample attached with the other case/Bug , may I know through which event you are trying to get the selected item.

    I attached the sample application which was using for my testing could you modify the sample reproducing the issue and send me back for further investigation.

    Looking forward to hear you back.

    Sincerely,
    Divya Jain
    Associate Software Developer

    4810.DataTreeTest.zip

Children