RadScrollablePanel disable wheel scrolling

3 posts, 1 answers
  1. Amige
    Amige avatar
    52 posts
    Member since:
    Dec 2013

    Posted 27 Mar 2018 Link to this post

    Hello,

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

     

    Regards,

    Alberto

  2. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3284 posts

    Posted 29 Mar 2018 Link to this post

    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.
  3. Amige
    Amige avatar
    52 posts
    Member since:
    Dec 2013

    Posted 29 Mar 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thank you Dess,

    That works.

    Regards,

    Alberto Martinez

Back to Top