Drag drop interaction between gridview and sheduler

2 posts, 0 answers
  1. Gerd
    Gerd avatar
    4 posts
    Member since:
    Aug 2012

    Posted 03 Aug 2009 Link to this post


    We are considering to make a planningstool with on the one hand a grid view with all tasks to be planned and on the other hand a sheduler for each employee...

    We would like to have a drag and drop functionality between the grid and the sheduler

    we are using Winforms Q3 2008

    is this possible ? Can somebody provide me some code ?

  2. Boyko Markov
    Boyko Markov avatar
    610 posts

    Posted 05 Aug 2009 Link to this post

    Hello Gerd,

    Thank you for writing us.

    RadScheduler do not have a built in support for OLE drag drop. As our controls inherit from the standard Control class and you can subscribe to the drag drop events and manage the drag drop operation between different controls.  You should use events such as DragOver, DragEnter, DragLeave, DragDrop. In the beginning of drag drop operation you should also call DoDragDrop method. To enable drop operation when you are over a control you should set the AllowDrop property of that control to true. When you drop something on RadScheduler you can find the exact scheduler cell where you have dropped an item. To do this you can use the following code:

      void radScheduler_DragDrop(object sender, DragEventArgs e)
                Point screenPoint = new Point(e.X, e.Y);
                Point localPoint = this.radScheduler.PointToClient(screenPoint);
                List<SchedulerDayViewElement> dayViewElements = new List<SchedulerDayViewElement>();
                SchedulerCellElement cell = SchedulerUIHelper.GetCellAtPoint(localPoint, dayViewElements);
                if (cell != null)
                    DateTime cellDate = cell.Date;

    Please write me back if you need more information.

    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top