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
2320
Test when user is Scrolling grid during MouseMove event
posted

I have two ultrawingrid with drag n drop functionality.  Everything is working perfectly except that when the user attempts to drag the horizontal scrollbar on the grid, the drag n drop operation starts and the user can't scroll the grid (via dragging the scrollbar).  I start the drag and drop operation in the grid_MouseMove event.  It calls the grid.DoDragDrop method. 

 My question is, what would be the best way to tell at that point whether the user is actually scrolling the grid?

 I tried setting a flag in the "BeforeColRegionScroll" and "AfterColRegionScroll", then check that flag in the grid_MouseMove but it didn't work properly.

 I noticed I can see the underlying UIElement by going to Grid.DisplayLayout.UIElement.ElementWithMouseCapture, but there must be a better way?

What would be the best/easy way to tell during the MouseMove event whether the user is scrolling the grid via the scrollbar?

 

Thanks