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
785
Ultragrid - mouse wheel event bubbles up to parent container
posted

Hi,

I have a grid on a container form that has its scrollbar displayed.
If I click on the grid to set the focus on one row and then start scrolling with the mouse wheel, the parent container also scrolls.

I tried listening to the MouseWheel event to set the e.Handled = true but it did not fix the problem.

void ultraGrid1_MouseWheel(object sender, MouseEventArgs e)
{
this.OnMouseWheel(e);

HandledMouseEventArgs handledArgs = e as HandledMouseEventArgs;
if (handledArgs != null)
    handledArgs.Handled = true;
}

What am I missing?
Thanks.

Annie