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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl and its Parent ScrollBar scrolls together when mouse scrolled.

Thread ID:

Created:

Updated:

Platform:

Replies:

142642 Feb 13,2019 07:22 AM UTC Feb 14,2019 10:10 AM UTC WinForms 3
loading
Tags: GridControl
Harinarayana
Asked On February 13, 2019 07:22 AM UTC

Hi,

I am using GridControl in my app. GridControl will display Vertical Scroll bar after loading items.
At the the same time as items are more in UI, GridControl's parent, Form control also has its own ScrollBar.
When we scroll mouse on top of GridControl, both GridControl and Form's ScrollBar scrolls together.
If we scroll on top of ListView (Default win form control), only ListView ScrollBar scrolls. If we move mouse control outside, then Form's ScrollBar moves.
I need same behavior in GridControl. Could you pls help me to solve this issue?

Regards,
Harinarayana.

Arulraj A [Syncfusion]
Replied On February 14, 2019 05:40 AM UTC

Hi Harinarayana, 

Thanks for using Syncfusion product. 

You can avoid scrolling of GridControl’s parent by overriding its parent’s OnMouseWheel method and allow mouse wheel if its child element is empty at the mouse over point. Here we have restricted for Form’s mouse wheeling while scrolling is done in GridControl. 

protected override void OnMouseWheel(MouseEventArgs e) 
{ 
    var child = this.GetChildAtPoint(e.Location); 
    if (child == null) 
        base.OnMouseWheel(e); 
} 


Regards,  
Arulraj A  


Harinarayana
Replied On February 14, 2019 09:47 AM UTC

Thank you very much for the quick helpful response and support.
Now it is working fine with the below solutions.

Arulraj A [Syncfusion]
Replied On February 14, 2019 10:10 AM UTC

Hi Harinarayana, 

Thanks for the update. 

Please feel free to contact us in case of any further difficulty. We'll be glad to assist you. 

Regards, 
Arulraj A 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon