It works like this:
1. When you use EventClickHandling="JavaScript" the Scheduler will fire the JavaScript code specified using EventClikJavaScript property.
2. It will pass "e" object to the JavaScript code - it's the DayPilot.Event object (http://api.daypilot.org/daypilot-event-class/) that represents the event. You can use it to read the event properties, such as id:
var id = e.id();
3. The shift scheduling tutorial (http://code.daypilot.org/34377/shift-scheduling-tutorial-asp-net-sql-server-c-vb-net) uses the eventClick() method to open a modal dialog with event details. It is defined in event_handling.js:
function eventClick(e) {
var modal = dialog();
if (e.recurrent()) {
modal.showUrl("Edit.aspx?id=" + e.recurrentMasterId());
}
else {
modal.showUrl("Edit.aspx?id=" + e.value());
}
}
function dialog() {
var modal = new DayPilot.Modal();
modal.top = 60;
modal.width = 400;
modal.height = 450;
modal.opacity = 70;
modal.border = "10px solid #d0d0d0";
modal.closed = function () {
if (this.result == "OK") {
dp.commandCallBack('refresh');
}
dp.clearSelection();
};
return modal;
}
I have tested the tutorial code and it seems to work fine - try adding a console.log() call to the method:
function eventClick(e) {
console.log("opening event details for event: " + e.id());
}
4. It uses DayPilot.Modal helper to open the target page (Edit.aspx) in a modal dialog. You can find more details about the DayPilot.Modal helper here:
http://code.daypilot.org/81367/daypilot-modal