Scroll while Dragging inside RadListControl

2 posts, 0 answers
  1. Nafeh
    Nafeh avatar
    1 posts
    Member since:
    Sep 2016

    Posted 01 Sep 2016 Link to this post


    I am usingRadListControl to show some bound data and implemented drag-drop following the instruction given here. The Drag drop works okay, but I need to implement scrolling while dragging an item so that it can be dropped anywhere the user wants to. I've tried to search for it, but was not successful. Could anyone please provide any solution or workaround for this?


  2. Dimitar
    Dimitar avatar
    2807 posts

    Posted 02 Sep 2016 Link to this post

    Hello Nafeh,

    Thank you for writing.

    You can use the DragOver event and check if the mouse is in the bottom part of the list view:
    private void RadListControl1_DragOver(object sender, DragEventArgs e)
        var point = this.PointToClient(new Point(e.X, e.Y));
        var rect = new Rectangle(new Point(0 , radListControl1.Location.Y + (radListControl1.Height / 4) *3 ), new Size(radListControl1.Width, radListControl1.Height / 4));
        if (rect.Contains(point))
            if (radListControl1.ListElement.VScrollBar.Value + 10 < radListControl1.ListElement.VScrollBar.Maximum - radListControl1.Height)
                radListControl1.ListElement.VScrollBar.Value += 10;

    I hope this will be useful. 

    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Back to Top