Note that e.DataItem is only accessible if DayPilotScheduler.DataBind() has been called to reload the event data. If you have ViewState enabled the events will be accessible during PostBacks but e.DataItem will be null.

In the Pro version, you can store selected data fields with the events using DataTagFields instead - these custom fields will be serialized to ViewState. The fields specified using DataTagFields will be accessible in the server-side event handlers (using e.Tag[fieldName]) and on the client side (e.tag(fieldName)].