We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GBDB scrolling issue

I have an issue where the scrolling of the grid bubbles up to the parent once the grid scrolls to the end. This causes the rest of the user control that the grid is on to scroll. Any ideas on how I can handle this? JH

5 Replies

AD Administrator Syncfusion Team June 10, 2004 04:07 PM UTC

Are you using the scrollbar to scroll or arrow keys or mouse wheel or something else? Can you see this problem in one of our samples, or can you post a sample showing it?


JH Jamie Hill June 10, 2004 04:22 PM UTC

Thanks for the quick reply. >Are you using the scrollbar to scroll or arrow keys or mouse wheel or something else? I am using the mouse wheel to scroll. >Can you see this problem in one of our samples, or can you post a sample showing it? I cannot find an example where you are using the same controls. I have a form which contains a user control which the grid is on. The user control also contains multiple XPTaskBarBoxes, labels and other grids. I cannot break out a sample for you as it is integrated into my app and would take a number of hours to create another sample. The only thing I can think of that could be causing the issue is that the user control on the form is set to a smaller height than the full control with a docking of Fill. AutoScroll is set to True. Any ideas you have about this would be greatly appreciated. Thanks


JH Jamie Hill June 10, 2004 06:35 PM UTC

Also, the grid is inside of one of the XPTaskBarBox child panels. I am not sure if that helps any. Thanks


AD Administrator Syncfusion Team June 10, 2004 07:26 PM UTC

I was able to avoid the wheel scrolling a form by overridng the Form''s WndProc and ignoring the mousewheel message. Doing this allowed the grid on the form to scroll with the wheel, but the parent form did not scroll.
protected override void WndProc(ref Message m)
{
	if(m.Msg != 0x20a) //(WM_MOUSEWHEEL)
	{
		base.WndProc (ref m);
	}
}
Maybe the same technique will work for you and your user control that is being scrolled.


JH Jamie Hill June 11, 2004 11:59 AM UTC

Thanks Clay, I was able to make this work with a little extra code that checked if the grids were in focus. If one of the grids is in focus the scroll is cancelled. >I was able to avoid the wheel scrolling a form by overridng the Form''s WndProc and ignoring the mousewheel message. Doing this allowed the grid on the form to scroll with the wheel, but the parent form did not scroll. > >
>protected override void WndProc(ref Message m)
>{
>	if(m.Msg != 0x20a) //(WM_MOUSEWHEEL)
>	{
>		base.WndProc (ref m);
>	}
>}
>
> >Maybe the same technique will work for you and your user control that is being scrolled.

Loader.
Live Chat Icon For mobile
Up arrow icon