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

GanttView cancel drag under certain conditions

1 Answer 85 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Blas
Top achievements
Rank 1
Blas asked on 16 Oct 2019, 01:58 PM

Hi,

Is there an event that fires when the user is moving an item in the timelime? I would like to check if the item overlaps with other items that depend on the parent and cancel the drag action if there is any conflict.

 

Thanks

Blas

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 Oct 2019, 08:46 AM

Hello, Blas,      

As a descendant of RadDragDropService, GanttViewDragDropService handles the whole drag and drop operation. Its PreviewDragOver event allows you to control on what targets the task being dragged can be dropped on. Here you can set the CanDrop property to false and thus the drop operation will be forbidden. The PreviewDragDrop event allows you to get a handle on all the aspects of the drag and drop operation, the source (drag) RadGanttView, the destination (target) control, as well as the task being dragged.

Additional information about the basic drag drop service and its derivative used in RadGanttView is available in the following help articles:

https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/raddragdropservice

https://docs.telerik.com/devtools/winforms/controls/ganttview/drag-and-drop/ganttviewdragdropservice

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GanttView
Asked by
Blas
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or