Our state of the art Gantt chart


Post by rayudu.pasumarthy »

Hi,

Is it possible to enable a contextMenu similar to taskMenu but with different options when we click below the last task rather than showing the Chrome contextMenu?

Steps in advanced example (https://www.https://bryntum.com/examples/gantt/advanced/):

  1. Search for 'Configure' in the title search
  2. Right click on the empty space below 1.1.4
context_menu_below_task.png
context_menu_below_task.png (49.8 KiB) Viewed 351 times

Thanks,
Rayudu.


Post by saki »

It is not configurable but it can be done. The area below the task list is just and HTML element so listener can be installed on it. You can access this element and install listener on it this way:

gantt.subGrids.locked.element.addEventListener('contextmenu', e=>console.log(e));

In the real life you would prevent the default event in the listener and you would show the Bryntum menu instead.

See also:


Post by rayudu.pasumarthy »

Thanks Saki, it's working great!


Post by Animal »

Gantt needs its own subclass of ScheduleMenu which inherits from Scheduler's. It can be not enabled by default (because I cant think of any default items), but it is most definitely something which our client developers could find uses for.

Here's a FR ticket: https://github.com/bryntum/support/issues/3822


Post Reply