The rows.collapseAll() method collapses all nodes of the JavaScript Scheduler resource tree.
DayPilot.Scheduler.rows.collapseAll()
dp.rows.collapseAll();
DayPilot.Scheduler.rows.expandAll()
Resource Tree [doc.daypilot.org]
DayPilot.Scheduler Class
Availability of this API item in DayPilot editions: