Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Grid Tech Support » Unbound Elegant Grid exceptions during scrolling and updating Collapse All
Subject Author Date
Alexander Kaay Aug 20, 2010 - 10:11 AM

Greetings,


Elegant Grid 3.7 Unbound Grid appears to be reliably producing exceptions under the following circumstances:


- scrolling is in progress (mouse button down and moving)


- timer expires to rebuild the table contents, which removes all rows and adds all new ones (same thread as the message pump)


Stack trace:


System.ArgumentOutOfRangeException occurred

  Message=Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

  ParamName=index

  Source=mscorlib

  StackTrace:

       at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)

       at Elegant.Ui.Grid.RenderableCollection.get_Item(Int32 index)

       at Elegant.Ui.Grid.UnboundContentRenderingManager.OnAddItemToTopComplete()

       at Elegant.Ui.Grid.GridControlBase.OnAddItemToTopComplete()

       at Elegant.Ui.Grid.ScrollableByItemControl.AdjustScrollBars()

       at Elegant.Ui.Grid.ScrollableByItemControl.OnVerticalScrollBarMaximumChanged()

       at Elegant.Ui.Grid.SelectableByItemControl.OnVerticalScrollBarMaximumChanged()

       at Elegant.Ui.Grid.ScrollableControl.set_VerticalScrollBarMaximum(Int32 value)

       at Elegant.Ui.Grid.UnboundContentRenderingManager.RebuildRenderingList()

       at Elegant.Ui.Grid.UnboundContentRenderingManager.ProcessUnboundRowAddition(Row row)

       at Elegant.Ui.Grid.UnboundContentRenderingManager.ProcessUboundRowCollectionChange(CollectionChangeEventArgs e)

       at Elegant.Ui.Grid.UnboundContentRenderingManager.UnboundRows_CollectionChanged(Object sender, CollectionChangeEventArgs e)

       at Elegant.Ui.Grid.CollectionWithEvents.OnCollectionChanged(CollectionChangeEventArgs e)

       at Elegant.Ui.Grid.CollectionWithEvents.OnInsertComplete(Int32 index, Object value)

       at Elegant.Ui.Grid.ObjectAssociatedWithGridCollection.OnInsertComplete(Int32 index, Object value)

       at Elegant.Ui.Grid.RenderableCollection.OnInsertComplete(Int32 index, Object value)

       at System.Collections.CollectionBase.System.Collections.IList.Insert(Int32 index, Object value)

       at Elegant.Ui.Grid.RowCollection.Add(Row value)

       at AVue.FCassetteBrowser.NestAdd(CPNest ANest)

  InnerException:


I am not sure if this makes any difference, but the message loop for the windows is NOT running on main application thread.


I tried a few workarounds, but none are too effective besides tracking scrollbar mouse events and that’s not as easy as may first appear. Suggestions?


-A


 


 

Alexander Kaay Aug 21, 2010 - 10:00 AM

Here is another exception, maybe helpful:



System.ArgumentOutOfRangeException occurred
  Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  ParamName=index
  Source=mscorlib
  StackTrace:
	   at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
	   at Elegant.Ui.Grid.RenderableCollection.get_Item(Int32 index)
	   at Elegant.Ui.Grid.UnboundContentRenderingManager.OnRemoveItemFromTopComplete()
	   at Elegant.Ui.Grid.GridControlBase.OnRemoveItemFromTopComplete()
	   at Elegant.Ui.Grid.ScrollableByItemControl.OnScrollBarValueChanged(ScrollBarOrientation scrollBarOrientation, Int32 newValue, Int32 oldValue)
	   at Elegant.Ui.Grid.GridControlBase.OnScrollBarValueChanged(ScrollBarOrientation scrollBarOrientation, Int32 newValue, Int32 oldValue)
	   at Elegant.Ui.Grid.ScrollableControl.VerticalScrollBar_ValueChanged(Object sender, ScrollBarValueChangedEventArgs e)
	   at Elegant.Ui.ScrollBarBase.OnValueChanged(Int32 oldValue)
	   at Elegant.Ui.ScrollBarBase.set_Value(Int32 value)
	   at Elegant.Ui.Grid.ScrollableControl.set_VerticalScrollBarValue(Int32 value)
	   at Elegant.Ui.Grid.ScrollableControl.OnMouseWheel(MouseEventArgs e)
	   at Elegant.Ui.Grid.GridControlBase.OnMouseWheel(MouseEventArgs e)
	   at System.Windows.Forms.Control.WmMouseWheel(Message& m)
	   at System.Windows.Forms.Control.WndProc(Message& m)
	   at Elegant.Ui.Control.WndProc(Message& m)
	   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
	   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
	   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
	   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
	   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
	   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
	   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
	   at System.Windows.Forms.Application.Run(Form mainForm)
	   at AVue.FCassetteBrowser.TIStart(Object ASettings) in C:\AutoFET\AutoFET5\AutoFET5\GUI\FCassetteBrowser.vb:line 278
  InnerException: