The rows.selection.add() method adds the specified DayPilot.Task to the current row selection.
DayPilot.Gantt.rows.selection.add(task);task (DayPilot.Task) - item to add to the row selection
const task = gantt.tasks.find("1");
gantt.rows.selection.add(task);DayPilot.Gantt.rows.selection.clear()