Skip to main content

setParent

Description

Set the parent for a task

setParent: (task: Task, pid: number | string) => void

Parameters

  • task - (required) Task - the task object
  • pid - (required) number | string - the parent task id

Example

gantt.setParent(gantt.getTask(2), 20);
gantt.updateTask(2);