I have the following Grid setup:
Exception: System.ArgumentException: Operator 'IsEqualTo' is incompatible with operand types 'DateOnly?' and 'DateTime'
Hello everyone,
Upon reviewing the case, I believe the issue may not be directly related to the TelerikGrid component. The OnRead event arguments seem to return the correct DateOnly filter when the DatePicker value is changed.
> OnRead args.Request object
It seems the problem arises during the serialization and deserialization process, where the DateOnly value is being converted to DateTime.
> Same object value after the deserialization
This conversion changes the FilterDescriptor value type, causing a mismatch. Specifically, the ToDataSourceResult method expects filter descriptors for a DateOnly column, but after deserialization, a DateTime value is passed instead, which leads to the exception.
When the request object is passed directly to the ToDataSourceResult method without serialization, everything functions as expected. See: https://blazorrepl.telerik.com/cSaNmybd33AyNXbl39
Since this behavior appears to be related to the serialization process, I do not think it is not something we can resolve within the grid itself. With this in mind, I’ll go ahead and close this item.
Thank you for your understanding.
Regards,
Yanislav
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.