1. In the Lite version, e.DataItem is only used for ViewType="Gantt". In that case, it stores the event source object (after calling DataBind()). In other modes e.DataItem.Source is null. In the Pro version you can set the source object using DayPilotScheduler.Resources collection.
In the Lite version, you need to lookup the source object using its id (stored in e.Id).
2. Also, e.CssClass is only available in the Pro version.
In the Lite version, you need to use e.Html instead, e.g.:
e.Html = "<div class='my-class'>" + e.Name + "</div>";