Grid doesn't react to 200 in ODataV4Adaptor custom batchRequest

Dear Team!


I have implemented a custom batchRequest in the ODataV4Adaptor like this:

 load() {
    const adaptor = new ODataV4Adaptor();
    adaptor.batchRequest = (dm: DataManager, changes, e, query: Query, original) => {
      const updatedRecords = changes.changedRecords;
      return {
        type: "PUT",
        url: `${environment.ApiBackendBaseUrl}api/Vehicle/discontinued/update`,
        contentType: "application/json; charset=utf-8",
        data: JSON.stringify(updatedRecords)
      };
    }
    this.data = new DataManager({
      url: this.baseUrl + 'odata/GetAllDiscontinuedVehicles',
      adaptor: adaptor,
      dataType: 'Vehicle',
      headers: [{ Authorization: 'Bearer ' + this.accessToken }],
    });
  }


The request succeeds, i get a 200 back, but the grid spinner is still there and it doesn't become "saved", The edited cells remain green, the Update button is still enabled.


What am I doing wrong?

Thank you.


1 Reply

RR Rajapandi Ravi Syncfusion Team February 17, 2022 01:54 PM UTC

Hi Katona, 

Greetings from Syncfusion support 

Before we start providing solution on your query, we need some information for our clarification. So please share the below details that will be helpful for us to provide better solution. 

1)         Please share your complete Grid rendering code. 

2)         Please share the code part about how you are handling update method at server side, we would like to check how you are returning the result from your server side. 

3)         Please share the screenshot if any scripts error throws in the console window. 

4)         Please share the screenshot of your network tab response. 

5)         Please confirm your Syncfusion package version. 

Regards, 
Rajapandi R 


Loader.
Up arrow icon