The groups.collapsed() method returns an array with collapsed concurrent event groups for the Scheduler row.
DayPilot.Row.groups.collapsed()Returns an array of group objects for the groups that are currently collapsed.
Each group object provides expand() and collapse() methods that let you change the group state.
const collapsedGroups = dp.rows.find("A1").groups.collapsed();DayPilot.Row.groups.expandAll()
Concurrent Event Groups [doc.daypilot.org]