How to display the add button for job types (project), and not the add button for other types of jobs.There is also which event is triggered by add
Hello,
You need to add a custom “+” button. To do that, you need to use the template function in the column configuration, which allows you to return any text or HTML elements:
In that function, you can add a condition to return the button or not.
If you return an HTML element with the gantt_add class name, Gantt adds the “+” button.
Here are examples:
Alternatively, you can hide the button by returning a custom class name in the grid_row_class template and adding the styles to hide the button:
Here is an example:
If you use the built-in “+” button (or a custom element with the gantt_add class name), Gantt calls the createTask method:
After that, Gantt calls the onTaskCreated event:
Then Gantt calls the onBeforeLightbox and onLightbox events:
If you use a custom button that doesn’t have the gantt_add class name, Gantt doesn’t do anything with that. It is up to you to attach event handlers to the button. Then the event triggering depends on the methods you use.
