Closed kerajel closed 2 months ago
Sub properties in OData format are described with slash (/) not dot (.): https://services.odata.org/v4/OData/OData.svc/Suppliers?$filter=Address/Street%20eq%20%27NE%20228th%27
Dates are not quoted: https://services.odata.org/V4/OData/OData.svc/Products?$filter=ReleaseDate%20gt%202006-12-30T23:59:59.99Z
This is weird because System.Linq.Dynamic.Core can't consume either of these queries. Is Radzen supposed to work with some other library?
And when you say that dates are not quoted, does it apply to LINQ specification or odata? Because the second example shows linq-compatible string, not odata string.
When I filter DateTime using RadzenDataGrid I see the following in the LoadDataArgs: Filter: CreatedAt = DateTime("2024-08-14") You see, in this case date is quoted, and System.Linq.Dynamic.Core can consume it contrary to the string produced by RadzenDataFilter
Indeed dates for Dynamic LINQ expression should be quoted - the expression added by this pull request is wrong: https://github.com/radzenhq/radzen-blazor/commit/1051bfa6611dfe6e50071f1a8dd505716e497e59
I'll fix it.
To Reproduce Steps to reproduce the behavior:
Order.Date
by selecting 'Order Date' in the filter, operator Equals, value 08-08-2024 from the date time picker.Observed Values
oDataFilterString
:Order/Date eq 2024-08-08T00:00:00.000Z
--malformed OData string, slash instead of dot, no quotation marks over DateTime.Order.Date eq "2024-08-08T00:00:00.000Z"
dynamicLinqFilterString
:((Order.Date) = DateTime(2024-08-08T00:00:00.000Z))
--malformed Dynamic LINQ string, no quotation marks over DateTime.((Order.Date) = DateTime("2024-08-08T00:00:00.000Z"))
Radzen.Blazor 5.0.8