Scheduler ResourceHeaderClickJavaScript
Asked by Jose Miguel Icaza
4 years ago.
Need room name or id to pass to the modal screen
Answer posted by Dan Letecky [DayPilot]
4 years 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
4 years 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]
4 years ago.
In ResourceHeaderClickJavaScript, you can use "resource.value" to get the resource id:
ResourceHeaderClickJavaScript="ChangeRoom(resource.value);"
Comment posted by Jose Miguel Icaza
4 years ago.
I got it. Thanks much for your help Dan.
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.