Our state of the art Gantt chart


Post by andbennett »

Hi all, I could use a hand here.

I'd like to get the same drag-and-drop functionality as in this example: https://www.bryntum.com/examples/gantt/drag-resources-from-grid/ but using the BryntumResourceUtilization component.

I.e., I'd like to drag resources from the resource list of the Resource Utilization component, drop them onto tasks, and have the resources be assigned to those tasks.

Any advice?

// App.js

  ...
    <BryntumResourceUtilization
       setGridTree={setGridTree}
       ref={resourceRef}
       {...resourceConfig}
    />
  ...
}
New Project (1).jpg
New Project (1).jpg (2.2 MiB) Viewed 152 times

Post by mats »

That's very easy to do (I just made a sample like this for next release). Attaching the Drag.js to add to your demo, along with:

const drag = new Drag({
    grid      : resourceUtilization,
    gantt     : gantt
});
Attachments
dragfrom.mov
(690.4 KiB) Downloaded 26 times
Drag.js
(3.58 KiB) Downloaded 25 times

Post Reply