search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

I need to add an event listener on collapse name.

Asked by leigh
11 days ago.

Currently the collapse of the a row in the schedule is triggered by clicking the icon. But I would like trigger the collapse or expand, by clicking the name next to the icon. I have written code to achieve this, however; the Event listener is not added to the DOM node. I have tried add code after the api call and tried to use hooks like: 'onAfterEventRender' and 'onAfterRender' to no avail. The code works when I run it in the browser but only works once. Any advice?

Answer posted by Dan Letecky [DayPilot]
10 days ago.

Adding event listeners to Scheduler elements using global selectors is not a supported scenario. The Scheduler needs to update individual elements as needed.

Instead, use the provided render event handlers (e.g. onBeforeRowHeaderRender) to provide the functionality.

You can handle the row click using onRowClick event:

Please see also my answer here:

New Reply
This reply is
Your name (optional):