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

Drag drop interaction between gridview and sheduler

1 Answer 81 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Gerd
Top achievements
Rank 1
Gerd asked on 03 Aug 2009, 01:39 PM
Hello,

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 ?

thanks
gerd

1 Answer, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 05 Aug 2009, 07:32 AM
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>();
            dayViewElements.Add((SchedulerDayViewElement)this.radScheduler.SchedulerElement.ViewElement);
            SchedulerCellElement cell = SchedulerUIHelper.GetCellAtPoint(localPoint, dayViewElements);
            if (cell != null)
            {
                DateTime cellDate = cell.Date;
            }
        }  

Please write me back if you need more information.

Regards,
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.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Gerd
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Share this question
or