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