The collapse() method collapses the row.

In Pro, available since build 2259.

Available in DayPilot Lite for JavaScript since version 2026.4.899.

Declaration

DayPilot.Row.collapse()

Notes

This method updates the visible resource tree immediately. Collapsed descendants and their events remain loaded. Individual toggles retain the expansion flags of nested groups, so reopening a branch restores their previous states.

Use rows.find() to obtain the row. The resource's current expansion flag is available as row.data.expanded.

Example

dp.rows.find("G1").collapse();

See Also

DayPilot.Row Class

Availability

Availability of this API item in DayPilot editions:

ProductLitePro
DayPilot for JavaScript