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
360
Scrolling and the Mouse Wheel
posted

Is there a simple way to disable the mouse wheel scrolling for the ultragrid.  I tried the BeforeRowRegionScroll and a couple of others.  For BeforeRowRegionScroll i can't seem to tell when someone is scrolling with the mouse, or the scroll bar.  I also tried SetWindowsHookEx but i can't seem to trap the events from the grid, just the main form.

  • 69832
    Suggested Answer
    Offline posted

    Handle the MouseWheel event, and upcast the MouseEventArgs instance to type HandledMouseEventArgs. You will notice that the resulting instance exposes a 'Handled' property, which you can set to true to block the default processing of the mouse wheel.