I do have a List<MyObjects>
where MyObject
contains a property which is DateOnly
.
At the end of my service I want to apply some DevExtreme.AspNet.Mvc.DataSourceLoadOptions
on the List:
return DataSourceLoader.Load(myList, loadOptions);
The loadOptions contain a group
:
[{"selector":"myInformation.dateOnlyProperty","groupInterval":"year","isExpanded":true},
{"selector":"myInformation.dateOnlyProperty","groupInterval":"month","isExpanded":true},
{"selector":"myInformation.dateOnlyProperty","groupInterval":"day","isExpanded":false}]
The dateOnlyProperty
was a DateTime
before (which worked) and now it is DateOnly
(doesn't work).
The returned error-message is:
Unable to cast object of type 'System.DateOnly' to type 'System.IConvertible'.
How can I add that needed cast for DevExtreme.AspNet.Data.DataSourceLoader.Load(...)
? Or is there any other recommended solution?