跳到主要内容

setParent

Description

为任务分配一个父任务

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

Parameters

  • task - (required) Task - 任务对象
  • pid - (required) number | string - 父任务的ID

Example

gantt.setParent(gantt.getTask(2), 20);
gantt.updateTask(2);
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.