Hello,
Please look at the following code snip:
<SfGrid ID="DetailProgramsGrid" @ref="@DetailProgramsGrid" TValue="CustomerLoyaltyPrograms" AllowResizing="true" AllowSorting="true" AllowReordering="true"
Toolbar="@DetailProgramsTool"
Query="@(new Query().AddParams("$expand","customerloyaltyprogrampointsprogramnavigation").AddParams("$filter",$"customerloyaltyprogramsperson eq {selectedPersonId}"))">
<GridPageSettings PageSize="5"></GridPageSettings>
<GridEvents OnActionBegin="ActionBeginProgramsDetailHandler" RowSelected="DetailProgramsRowSelectHandler" TValue="CustomerLoyaltyPrograms"></GridEvents>
<SfDataManager Url=@($"{apiURL}/customerloyaltyprograms") Adaptor="Adaptors.ODataV4Adaptor" CrossDomain="true"></SfDataManager>
When I try to add a record, the OData API responds with the following error:
message: "The query specified in the URI is not valid. The requested resource is not a collection. Query options $filter, $orderby, $count, $skip, and $top can be applied only on collections."
I see that the POST request made from the Grid is including the $expand and $filter params. Is this se source of the error? Is there any way not to send this two params in the POST request?
I tested in postman without the $expand and $filter params and it works ok.
Thanks,
erick