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
15
InvalidOperationException - While Holding Down Mouse Over the Scroll Bar
posted

Hello,

I'm getting the InvalidOperationException whenever I scroll in an UltraGrid.

It happens randomly when I'm scrolling, especially if I hold down the mouse button over the scroll bar background to get the scroll bar to move to that location.

Nothing is being called when I scroll, just a cross thread issue between winforms and the grid

Here is the exception:

System.InvalidOperationException
HResult=0x80131509
Message=Cross-thread operation not valid: Control 'ugData' accessed from a thread other than the thread it was created on.
Source=System.Windows.Forms
StackTrace:
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.PointToClientInternal(Point p)
at System.Windows.Forms.Control.PointToClient(Point p)
at Infragistics.Win.ButtonUIElementBase.VerifyMouseOverButton()
at Infragistics.Win.ScrollButtonUIElement.n(Object
)
at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.TimerQueue.AppDomainTimerCallback()

Any ideas? Thanks!