Grid Transport call for CREATE is not sending model on Ajax Call

0 Answers 47 Views
Data Source DropDownList Grid
Jose
Top achievements
Rank 1
Jose asked on 07 Jun 2022, 07:35 PM
I have an OData 4 API in Dot Net to which I am making calls on a grid to read(GET), update(PUT), create(POST) and destroy (DELETE).

For some reason, the resulting AJAX call from the create does not include the model, and it is always null at the API handler, causing ModelState.IsValid to be false.

read, and update are both working fine, and API create(POST) call from Postman with correct JSON in the body of the request accomplishes the add.

Can't seem to figure out how I am misconfiguring the grid create transport. Have include screen shots of relevant code,  can include complete file of UI and API on request.

 I also have 2 short videos illustrating the create error and successful update, but since I cannot upload mp4 files, I have not included. they are available on request.

Any help would be greatly appreciated. Thanks!
Georgi Denchev
Telerik team
commented on 10 Jun 2022, 02:10 PM

Hi, Jose,

I am not able to determine the exact cause of the issue based on the provided information. The transport snippet looks fine to me and the rest of the code snippets shouldn't have any effect on the request itself.

Could you check the OdataV4 editing demo of the Grid, as well as its back-end MVC service and see if there any differences between them and your configuration?

If you don't see anything unusual, could you share the Controller as well as the full Grid and DataSource configurations so I can take a look at them?

As for the video files, you can add them to a zip archive and then attach them to the thread.

Best Regards,

Georgi

No answers yet. Maybe you can help?

Tags
Data Source DropDownList Grid
Asked by
Jose
Top achievements
Rank 1
Share this question
or