I was told to ask here. Enums seem not to be supported by kendo's datasource in conjunction with OData v4 and MVC.
E.g. if I have a nullable enum property on an entity, the following issues arise:
1) The grid won't display values for such types.
2) When editing or adding new records, the datasource becomes confused and sends always the value null to the server.
(told me by one of Telerik's supporters today)
a) Define as foreign key to a list of enum-name/display: E.g.: columns.ForeignKey(m => m.Gender, PickItemsHelper.ToSelectList<PersonGender>(includeNull: true, useNames: true));
b) Define as of type string in the schema -> model : model.Field("Gender", typeof(string));
This now works for (1) and (2). I consider this a temporary workaround for a non-implemented part of the OData v4 spec.
However, when applying the workaround an additional issue pops up:
3) When explicitly selecting the null value (i.e. when we have a nullable enum), the datasource now sends an empty string to the server, which rejects the request as invalid because it expects either an enum name or null.
Any clues how to work around issue (3)?