The toggle() method expands a collapsed row or collapses an expanded row.

Available in DayPilot Lite for JavaScript since version 2026.4.899.

Declaration

DayPilot.Row.toggle();

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").toggle();

See Also

DayPilot.Row Class

Availability

Availability of this API item in DayPilot editions:

ProductLitePro
DayPilot for JavaScript