You can add the event handler like this:
DayPilotCalendar1.BeforeEventRender += DayPilotCalendar1_BeforeEventRender;
> Microsoft JScript runtime error: Unable to get value of the property 'rows': object is null or undefined
Please create a new question for this issue and specify the version of DayPilot you are using (and also under what conditions it is happening).