Our state of the art Gantt chart


Post by sanjeeva »

I am trying to customize context menu. I am able to rename "Task Above" and "Task Below"
but renaming to "Subtask" is not working. my code is as below.

features: {       
cellEdit: { addNewAtEnd: false },
excelExporter : { zipcelx, // Choose the date format for date fields dateFormat : 'YYYY-MM-DD HH:mm' }, pdfExport : { exportServer : 'https://localhost:8079' // Required }, mspExport : { // Choose the filename for the exported file filename : 'Gantt' }, taskMenu: { // Extra items for all events items: { add: { menu: { addTaskAbove: { text: 'Add Component Above', onItem: async ({ source:gantt, taskRecord }) => {
const task = await gantt.addTaskAbove(taskRecord);
task.startDate = null; task.endDate = null; gantt.project.commitAsync(); } }, addTaskBelow: { text: 'Add Component Below', onItem: async ({source:gantt, taskRecord }) => {
const task = await gantt.addTaskBelow(taskRecord);
task.startDate = null; task.endDate = null; gantt.project.commitAsync(); } }, addSubtask: { text: 'Add Sub Component', onItem: async ({source:gantt, taskRecord }) => {
const task = await gantt.addSubtask(taskRecord);
task.startDate = null; task.endDate = null; gantt.project.commitAsync(); } } } } } } }

Post by alex.l »

Please check docs here: https://bryntum.com/docs/gantt/api/Gantt/feature/TaskMenu

the correct name for this menu item is subtask

All the best,
Alex


Post by sanjeeva »

Yes. it fixed the issue


Post Reply