Does the Blazor grid have any support for any or all queries on sub-property collections? I would like to have the grid OnRead be able to generate a query against a sub-entity collection.
E.g.
GET serviceRoot/People?$filter=Emails/any(s:endswith(s, 'contoso.com'))
From what I can tell the Column.FieldName property only will generate a valid query for scalar properties. Is there any way to make this work?
Given the Northwind OData sample https://demos.telerik.com/kendo-ui/service-v4/odata. I would like to display a grid of all customers. In the grid, I would like to have a column that provides filtering for the orders shipper column as in the query below.
https://demos.telerik.com/kendo-ui/service-v4/odata/Customers?$expand=Orders&$filter=Orders/any(d: contains(d/Shipper/CompanyName,'Speedy Express'))
There does not seem to be a way for the in-built filter mechanism to use a lambda and it seems like there should be.
I would like to propose a solution for this problem by allowing for some custom syntax in the property field and extending the Telerik.Blazor.Extensions.DataSourceExtensions to process that new syntax. Essentially lambda's have an inner and outer part. My suggestion is to allow the property to define the lambda as the inner and outer part with a delimiter in this case a pipe.
For example: Products/any(p: {0})|p.ProductName
This syntax can be extended to handle multiple nested lambdas in the outer pipe. Of course using this syntax would require the column be templated to actually handle the display of the resulting data but I think that is a reasonable trade off.
Here are the proposed changes to the DataSource extensions to support this. I believe this code would be fully backward compatible with the existing implementation and would not constitute a breaking change. Looking forward to the communities thoughts.
using System;