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

Scheduler ResourceHeaderClickJavaScript

Asked by Jose Miguel Icaza
21 days ago.

Need room name or id to pass to the modal screen

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

I recommend using RowClickJavaScript instead. It handles the JavaScript onRowClick event:
https://api.daypilot.org/daypilot-scheduler-onrowclick/

You can access the resource id using args.row.id there:

<DayPilot:DayPilotScheduler
  RowClickHandling="JavaScript"
  RowClickJavaScript="console.log('id', args.row.id);"
  ...
/>
Comment posted by Jose Miguel Icaza
21 days ago.

Thank you Dan,

I couldn't make it work
The only combination that works for me is:

ResourceHeaderClickHandling="JavaScript"
ResourceHeaderClickJavaScript="ChangeRoom(2);"

I just need to replace the (2) for a anything I could identify the row, to calculate the roomid

Comment posted by Dan Letecky [DayPilot]
21 days ago.

In ResourceHeaderClickJavaScript, you can use "resource.value" to get the resource id:

ResourceHeaderClickJavaScript="ChangeRoom(resource.value);"
Comment posted by Jose Miguel Icaza
21 days ago.

I got it. Thanks much for your help Dan.

New Reply
This reply is
Your name (optional):