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
900
Dragging nested collapsed row results in Null ref exception
posted

Hi,

I have a very basic example where I bind a data grid to an
IList<Country> Nations {get; set;} property.

The Country class has two collections as properties:
IList<City> Cities { get; set;}
IList<Town> Towns { get; set;}.

I naturally get a nested grid of
Country1
+Cities
+Towns
Country2
+Cities
+Towns

When I drag a collapsed Cities, or Towns row, I immediately get a null reference exception:

 

System.IndexOutOfRangeException:Index was outside the bounds of the array.
   
Stack Trace:

   at Infragistics.Windows.DataPresenter.DataPresenterBase.RecordSelectionEnumerator.GetNextSiblingRecord(Int32 levelIndex, Boolean& retry)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.RecordSelectionEnumerator.GetNextSiblingRecord(Int32 levelIndex, Boolean& retry)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.RecordSelectionEnumerator.GetNextSiblingRecord(Int32 levelIndex, Boolean& retry)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.RecordSelectionEnumerator.MoveNext()
   at Infragistics.Windows.DataPresenter.DataPresenterBase.GetRecordsForSelection(Boolean select, RangeSelectionEvaluator evaluator)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.CalculateSelectionRange(Record record, SelectedItemHolder newSelection, Boolean clearExistingSelection, Boolean select)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.CalculateNewSelectionRange(ISelectableItem item, Boolean clearExistingSelection, Boolean select)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.InternalSelectRange(ISelectableItem item, Boolean clearExistingSelection, Boolean select)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.Infragistics.Windows.Selection.ISelectionHost.SelectRange(ISelectableItem item, Boolean clearExistingSelection)
   at Infragistics.Windows.Selection.SelectionStrategyExtended.OnMouseMove(ISelectableItem item, MouseEventArgs e)
   at Infragistics.Windows.Selection.SelectionController.OnMouseMove(MouseEventArgs e)
   at Infragistics.Windows.Controls.IGControlBase.OnMouseMove(MouseEventArgs e)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.OnMouseMove(MouseEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
---------------------------------------------------------------------------------------------------------------