OData update on Query including Navigation properties fails

For a grid bound to an SfDataManager (ODatav4), where the Grid uses a Query to expand some related data, e.g. 

.Expand(new List<string> { "InstrumentE" });

Then an update to the bound data (e.g. Transactions) of a single field (e.g. Strategy = 45), generates the following PATCH update to the bound OData datasource:

 PATCH https://localhost:7268/odata/ScripTransactions(741776) HTTP/1.1
{
  "Id": 741776,
  "Strategy": 45,
  "InstrumentE": {}
}

-> This is incorrect (the InstrumentE: {} part), and correctly fails against the OData Controller. How can we bind the grid to related data, but then when correct updates are generated only to base-entity data, have it generate correct Patch calls?


7 Replies

MS Monisha Saravanan Syncfusion Team February 16, 2024 11:33 AM UTC


Hi Phil,


Greetings from Syncfusion.


Before proceeding further kindly share us the below details from your end.


  1. Share us the entire Grid code snippet.
  2. We have fixed a similar issue in the thread. Kindly follow the mentioned thread for additional information.
  3. Share us the Nuget version used at your end.
  4. Share us whether you are facing any console error.
  5. Share us the video demonstration of the reported issue.
  6. If possible share us a simple issue replicating sample.


It would be very helpful for us to validate the reported issue at our end.


Regards,

Monisha



PH Phil Holmes February 19, 2024 12:16 AM UTC

Hi Monisha,


I can't send you my existing code, being part of proprietary system. I have given you the triggering line, which is to have an OData bound grid, where the Grid Query does an expand to a related entity, then an update to the base table, causing incorrect Patch content (also above).

Second, I'd very much like to look at the similar issue thread you mention, but the link you included appears broken. Could you please check & update? The link appears to point to: https://forumassist.syncfusion.com/186127, which fails.

I had hoped you could do a quick support check against your own (demo?) code base, I'm pretty confident you'll find the error occurs as described. Otherwise, I'm going to have to generate a whole OData & WASM project to support check for you also.

Please let me know.

Regards,
Phil




MS Monisha Saravanan Syncfusion Team February 19, 2024 02:12 PM UTC


Hi Phil ,


We have confirmed this as an issue and logged the defect report “Patch request is incorrect while using Expand query in DataGrid with OdataV4 adaptor” for the same and this fix will be included in our upcoming patch release which is expected to be rolled out on any of our upcoming release.


You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.      


https://www.syncfusion.com/feedback/51066/patch-request-is-incorrect-while-using-expand-query-in-datagrid


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization”



Regards,

Monisha




PH Phil Holmes February 19, 2024 08:48 PM UTC

Great, thank you.

Phil



MS Monisha Saravanan Syncfusion Team February 27, 2024 12:15 PM UTC

Hi Phil,


We are glad to announce that, we have included the fix for the issue “Patch request is incorrect while using Expand query in DataGrid with OdataV4 adaptor” in our 24.2.8 release.  So please upgrade to our latest version of Syncfusion NuGet package to resolve the reported issue. Please find the Nuget package for latest fixes and features from below.


Nuget : https://www.nuget.org/packages/Syncfusion.Blazor.Grid


We thank you for your support and appreciate your patience in waiting for this release. Please get back to us if you require any further assistance. 


Regards,

Monisha





PH Phil Holmes February 27, 2024 11:31 PM UTC

Thanks, looks like its working correctly now.



MS Monisha Saravanan Syncfusion Team February 28, 2024 09:44 AM UTC

Hi Phil,


We are glad to hear that the reported issue has been resolved at your end. Kindly get back to us if you have further queries. As always we will be happy to assist you.


Regards,

Monisha


Loader.
Up arrow icon