Drag from scheduler grid or agenda view into timeline


#1

Hi,
I am trying to drag events from a grid into a scheduler timeline view. However suite 7.1 does not allow this, it is only available for 5.2 or earlier.
I am trialling dragging events between multiple schedulers, however I can only drag events into the grid and agenda views, but not out.
Is it possible to drag events out of the grid or agenda views?


#2

Hi @uxplease,

Unfortunately, events on Grid and Agenda views are not draggable at all, which means that they can’t be dragged into different schedulers.
There is no built-in functionality to do what you required, but technically you can create some custom solution, which will do this.

Here could be the main steps:
1.) make each tr in the Grid or Agenda view draggable
2.) and implement js logic to add the dragged element to the timeline view(if it won’t work as it is)
3.) Implement logic that will remove the dragged event from the grid view

Unfortunately, I don’t have any ready demo for this, but here is an example of how some element could be dragged into the timeline view:
(drag the purple div to the timeline cells and drop)
http://snippet.dhtmlx.com/5/c9a240269

Main steps of this demo:
1.) Detect a drop of your draggable element on the scheduler
2.) Detect the section in which you drop it(in case of the timeline view)
3.) Call the addEvent method
4.) Rerender the scheduler with the render() method