This is a migrated thread and some comments may be shown as answers.

RadScrollablePanel disable wheel scrolling

2 Answers 10 Views
ScrollablePanel
This is a migrated thread and some comments may be shown as answers.
Amige
Top achievements
Rank 1
Veteran
Amige asked on 27 Mar 2018, 07:34 PM

Hello,

Is there a way to disble the scroll when using the mouse wheel?

 

Regards,

Alberto

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Mar 2018, 07:33 AM
Hello, Alberto,  

Here is a sample code snippet demonstrating how to stop the basic mouse wheel logic for RadScrollablePanel:

public class CustomPanel : RadScrollablePanel
{
    protected override RadScrollablePanelContainer CreateScrollablePanelContainer()
    {
        return new CustomRadScrollablePanelContainer(this);
    }
 
    public override string ThemeClassName 
    {
        get
        {
            return typeof(RadScrollablePanel).FullName; 
        }
    }
}
 
public class CustomRadScrollablePanelContainer : RadScrollablePanelContainer
{
    public CustomRadScrollablePanelContainer(RadScrollablePanel parentPanel) : base(parentPanel)
    {
    }
 
    protected override void OnMouseWheel(MouseEventArgs e)
    {
        //base.OnMouseWheel(e);
    }
}

It is just necessary to replace the default RadScrollablePanel with the custom one.

I hope this information helps. If you have any additional questions, please let me know. 

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Amige
Top achievements
Rank 1
Veteran
answered on 29 Mar 2018, 07:17 PM

Thank you Dess,

That works.

Regards,

Alberto Martinez

Tags
ScrollablePanel
Asked by
Amige
Top achievements
Rank 1
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Amige
Top achievements
Rank 1
Veteran
Share this question
or