Disable scrolling of a RadGridView

3 posts, 0 answers
  1. Ludovic
    Ludovic avatar
    5 posts
    Member since:
    Jul 2015

    Posted 09 Nov 2015 Link to this post

    Hi guys,

     

    When I use Ctrl + mouse wheel, my Grid simulates a zoom (each height cell is modified) like this :

    http://image.noelshack.com/fichiers/2015/46/1447064323-3143-noelpush.png

    I use the event PreviewMouseWheel but when I "zoom/zoom out", i scroll too. So I would like to disable temporary the scrolling when Ctrl is pressed.

     

    I found 

    this.RadGridView.IsHitTestVisible = false;

    But the Ctrl event doesn't work anymore. And Ctrl + mouse wheel is a shortcut very convenient, I would keep it... 

    I found too the CanVerticallyScroll property (GridView) but the RadGridView doesn't have it (?)

     

    Thanks for your help!

     

    Regards.

     

    I would like to disable temporary the scrolling of my RadGridView.
    I would like to disable temporary the scrolling of my RadGridView.
    I would like to disable temporary the scrolling of my RadGridView.
    I would like to disable temporary the scrolling of my RadGridView.
    I would like to disable temporary the scrolling of my RadGridView.
    I would like to disable temporary the scrolling of my RadGridView.
    I would like to disable temporary the scrolling of my RadGridView.
  2. Yoan
    Admin
    Yoan avatar
    1068 posts

    Posted 11 Nov 2015 Link to this post

    Hi,

    You can try to handle the PreviewMouseWheel when the Ctrl key is pressed. Please check the following code snippet for a reference:
    private void clubsGrid_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
            {
                if (KeyboardModifiers.IsControlDown)
                {
                    e.Handled = true;
                }      
            }

    It works as you expected at my side. Let me know how it works for you.

    Regards,
    Yoan
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Ludovic
    Ludovic avatar
    9 posts
    Member since:
    Oct 2015

    Posted 12 Nov 2015 Link to this post

    Hi,

     

    Yes, I found this solution later but my topic was considered like spam and had to be validated, so I could not post.

    But your code is working. Many thanks !

      

    Regards.​

Back to Top