The onEventDelete event fires when the user clicks the event delete icon in the upper-right corner. The "delete" icon is only visible if you enable event deleting using eventDeleteHandling property of the calendar.
This event is fired before the event is actually removed from the calendar. You can cancel the removal using args.preventDefault(). See also the onEventDeleted event which is called after the event is removed.
DayPilot.Calendar.onEventDelete(args);
dp.onEventDelete = function(args) { if (args.e.id() === "3") { args.preventDefault(); } };
onEventDelete(e)