I am using a Grid to try to display the results of querying a local database. The response from my web server is as follows:
This sends a response like:
{"result":[{"UserName":"jdoe","FirstName":"John","LastName":"Doe"},{"UserName":"doej","FirstName":"Jane","LastName":"Doe"}],"count":2}
My Javascript is as follows:
When I try to run this as is, the error action runs, but I haven't been able to determine the actual cause of that error because I can't figure out what e is. Any ideas on why my grid isn'
Hi Derek Saffie,
Greetings from Syncfusion support.
Query : Bind JSON response as data source
Before proceeding your query, we need some more details to validate the reported scenario. You have mentioned that actionFailure event triggers in your sample. So kindly share the below details with us which is more helpful to proceed your query further.
Regards,
Vinitha Balasubramanian
Hi Vinitha,
There is no script error from what I can tell. If I modify actionFailure like:
Nothing is every output to the console. I did try modifying the HTML to display some information about the error event:
But all it tells me is e is an "object". I've tried to figure out how to get an error message or other info out of e, but I haven't been able to do so. Any suggestions?
I had downloaded SyncFusion 20.1.0.55
Actually, from what I can tell, it is not even hitting my web server. Maybe the error is before that even happens?
Hi Derek Saffie,
Thanks for the update.
For further validation, We need some more detail that will be helpful for us to provide a better solution.
Regards,
Vinitha Balasubramanian
What I discovered was the DataAdaptor uses POST and not GET. I couldn't find much documentation for that outside of this forum. Is there any formal documentation of the POST request and expected body aside from what is in this forum?
Hi Derek Saffie,
Currently we are working your query and we will update further details on June 28, 2022.
until then we appreciate your patience.
Regards,
Vinitha Balasubramanian
Hi Derek Saffie,
Thanks for the patience.
We want to convey that URL adaptor will send a POST request for data fetching, CRUD action which is the default behavior.
If you want to use GET request we suggested you to use WebAPIAdaptor which will send GET request for data fetching and for CRUD operation, POST, PUT , DELETE request.
Kindly refer the below provided documentation for your reference.
Documentation link : https://ej2.syncfusion.com/documentation/data/adaptors/#web-api-adaptor
Regards,
Vinitha Balasubramanian