We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Need functionality of ODataV4Adaptor and UrlAdaptor

Thread ID:





131296 Jul 3,2017 12:01 PM Jul 4,2017 08:51 AM JavaScript 1
Tags: ejDataManager
Asked On July 3, 2017 12:01 PM


I am trying to use the batch requests of the ejGrid with Odata. The problem is: my controller listens in /odata/Users normal requests and /odata/$batch batch requests. I am trying to create a custom Data-Adaptor with ODataV4Adaptor and UrlAdaptor functionalities but it isn`t working, as the batch requests are sent to /odata/Users/$batch

 var myAdaptor = $.extend({},
                new ej.ODataV4Adaptor(), new ej.UrlAdaptor()
  var dataManager = ej.DataManager({
                url: "http://localhost:3998/odata/Users", batchUrl: "http://localhost:3998/odata",
                adaptor: myAdaptor

Also, checking the request body, I found the Url of the the PUT requests are sent to /odata/undefined(2) instead of to /odata/Users(2)

--batch_126d1511-24b5-4e60-b0db-6d2e2ae57504 Content-Type: multipart/mixed; boundary=changeset_e54c5420-09c6-4ca7-9230-cbc4cc3988d2 --changeset_e54c5420-09c6-4ca7-9230-cbc4cc3988d2 Content-Type: application/http Content-Transfer-Encoding: binary PUT undefined(2) HTTP/1.1 If-Match : * Accept: application/json;odata=light;q=1,application/json;odata=verbose;q=0.5 Content-Id: 0 Content-Type: application/json; charset=utf-8 {"id":2,"name":"asdf"} --changeset_e54c5420-09c6-4ca7-9230-cbc4cc3988d2-- --batch_126d1511-24b5-4e60-b0db-6d2e2ae57504--

Sorry for my english,

Thanks for the help,

Prince Oliver [Syncfusion]
Replied On July 4, 2017 08:51 AM

Hi Marcos, 

Thank you for contacting Syncfusion support. 

We are unable to replicate your scenario at our end reproduce the issue. Could you please provide a sample to replicate your scenario? it will help us provide you a solution. 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.