Sorry, it’s not expanded: false
, but collapsed: true
. It’s defined for the row
property of the source data object.
You can access the source data object using tasks.list or as data property of DayPilot.Task [returned by tasks.find()].
If the row
property is not defined, you need to create it.
const task = gantt.tasks.find(1);
if (!task.data.row) {
task.data.row = {};
}
task.data.row.collapsed = true;