Hi Niels,
Greetings from
Syncfusion Support.
To achieve your requirement, we suggest using either the newRowPosition
property or the contextMenu feature in the Gantt chart. The
newRowPosition property can be set to 'Child' to add a new record as a child
when a record is selected, and the Gantt chart will update accordingly.
Alternatively, the contextMenu feature can be used to add a record at a specific
position. Please refer to the attached code snippet and sample for more
information.
|
<ejs-gantt id="ganttDefault"
[enableContextMenu]="true"
[editSettings]="editSettings"
>
</ejs-gantt>
this.editSettings = {
allowAdding: true,
allowEditing: true,
allowDeleting: true,
allowTaskbarEditing: true,
showDeleteConfirmDialog: true,
newRowPosition: "Child"
};
|
You can find a working example on StackBlitz.
For more information, you may refer to the following
link:
https://ej2.syncfusion.com/angular/documentation/api/gantt/editSettings/#newrowposition
https://ej2.syncfusion.com/angular/documentation/gantt/managing-tasks/adding-new-tasks#context-menu
If you have any further questions or need additional assistance, please let me
know!
Regards,
Ajithkumar G