I have a grid set up like so using a custom datasource (The data set is large so I can't do filtering/sorting etc on client side):
<SfGrid TValue="Order" AllowPaging="true" AllowSorting="true" AllowFiltering="true" AllowGrouping="true">
<SfDataManager Url="/Orders/ForGrid" Adaptor="Adaptors.WebApiAdaptor"></SfDataManager>
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Menu" Mode="FilterBarMode.OnEnter"></GridFilterSettings>
<GridPageSettings PageSize="20"/>
<GridColumns>
...
<GridColumn Field="Item.Name" HeaderText="Item" Type="ColumnType.String"></GridColumn>
...
</GridColumns>
</SfGrid>
It is hitting an API endpoint where I am manually parsing the generated OData query.
When filtering on this column of a complex property -> e.g. Order.Item.Name, the generated filter is something like this: "startswith(tolower(Item/Name), null" instead of the expected string to filter on after the column it has null. For this same grid when filtering on a non-complex properly e.g. Order.Id the filter works appropriately and the value is passed in as part of the OData query.
I'm not sure what I need to do so that the grid will correctly pass through the filter value when filtering on complex property columns.
Hi Christopher ,
Sorry for the Inconvenience.
We are currently Validating the reported query with high priority at our end, and we will update the further details within two business days. Until then we appreciate your patience.
Regards,
Sarveswaran PK
Hi Christopher,
Based on your update, we created a sample using complex property column in WebAPI Adaptor. But we could not able to replicate a reported issue at our end. When filtering a complex field(Name.FirstName) with value as “nancy” we could proper filter query value in the controller. Kindly refer the attached image for your reference.
|
|
If you are still facing an issue, please share the currently using Nuget version
and runnable issue reproducing sample to us. It would be helpful for us, to
further evaluate the reported issue.
Regards,
Sarveswaran PK
Could you please share the actual implementation of your grid so I can see if I am missing anything there. I'm not concerned about the controller, but the mechanism that is generating the query string, which is built into the blazor grid component code.
The best would be if you could include this code sample as a zip file for me to look at myself to find any specific implementation details I am missing.
Hi Christoper,
Based on your update, we created a sample using complex property column in WebAPI Adaptor, but we suggest you to do custom filtering in controller. Kindly refer the attached sample for your reference.
Please get back to us if you are facing any further issues
Regards,
Sarveswaran PK
Hello,
I should have mentioned, I am running the Blazor grid on a client side WASM app. (.NET 6)
Your posted sample is .NET Core 3 and server side Blazor.
Other than this difference my code is implemented in the same way -- Potentially there is a bug with the query string generation when running syncfusion in a client side Blazor WASM environment.
Hi Christopher,
Sorry for the inconvenience caused
We have run a sample in client side WASM app (.Net 3 & 5) , but still we are not able to reproduce the mentioned issue. Currently, We are creating a sample on .Net 6 WASM app, We’ll check and update the status of the sample within 3 business days. In between, if possible, please share your sample. It’ll be helpful for us to further evaluate the reported issue.
If you have any further queries, please get back to us
Regards,
Sarveswaran PK