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

Drag and Drop not working

2 Answers 179 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Ronald
Top achievements
Rank 1
Ronald asked on 31 Mar 2011, 07:53 AM
Hi,

I' ve got the following problem:

In my application there is a window which includes a scheduleview on the left side and a treeview on the right side. The scheduleview itself is inside a user control. In the scheduleview there exist some appointments.
This scenario should work, but currently doesn't:

I select one treeview item and start a drag drop operation. If I am over an appointment in the scheduleview some conditions between the appointment and the treeview item should be checked.
Currently nothing works: I start dragging the treeview item. As soon as I am over the scheduleview, a "forbidden" symbol appears, and nothing more happens.

I've implemented following:

RadDragAndDropManager.SetAllowDrag(treeview,true);
RadDragAndDropManager.AddDragInfoHandler(treeview, new EventHandler<DragDropEventArgs>(OnDrag));
     RadDragAndDropManager.AddDragQueryHandler(treeview,new EventHandler<DragDropQueryEventArgs>(OnDragQuery));
           RadDragAndDropManager.AddDropQueryHandler(scheduleView, new EventHandler<DragDropQueryEventArgs>(OnDropQuery));
           RadDragAndDropManager.AddDropInfoHandler(scheduleView, new EventHandler<DragDropEventArgs>(OnDropInfo));
           RadDragAndDropManager.SetAllowDrop(scheduleView,true);

DragQuery works, but I never reach DropInfo or DropQuery. What am I doing wrong? I have to say, that a treeview item is NOT of type Appointment.

In RadScheduler, the procedure described above worked perfectly.

Please respond soon.
Thanks

2 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 31 Mar 2011, 04:42 PM
Hi Ronald,

We would strongly recommend using higher level APIs in RadScheduleView, not Mouse or RadDragAndDropManager events. Using our high level API for drag-drop - the DragDropBehavior, allows you to easily handle the drag-drop operations without the need to handle many events and to know the exact location where the user dropped the items (time, date and resources) on RadScheduleView.

I created a very simple application that demonstrates how to drag from RadTreeView to RadScheduleView, please find it attached.

UPDATE: Application updated for version 2011.2.920.

Greetings,
Valeri Hristov
the Telerik team
0
hardik
Top achievements
Rank 1
answered on 06 Apr 2011, 12:18 PM
hi telerik,

I just want know If want to use drag and drop in schedulView only not from any other control then how can i use above events as specified.?
I just want to drag the appointment from one resource to another or one time to another,
How can I know which appointment is dragged and where dropped.?

I want for silverlight. Sorry I asked question here because not get any post in silverlight related to drag and drop. I have already post question in silverlight but not get proper reply.

Thanks
Hardik
Tags
ScheduleView
Asked by
Ronald
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
hardik
Top achievements
Rank 1
Share this question
or