Auto save in Batch editing mode

Hi,

I'm using the datagrid in batch editing mode, but I want to use axios requests to post my data to the server. After the data is changed and posted through axios, how do I make the grid acknowledge the save has already been posted and remove the green highlight from the cell?

3 Replies 1 reply marked as answer

AG Ajith Govarthan Syncfusion Team September 8, 2020 03:46 PM UTC

Hi Christian, 

Thanks for contacting Syncfusion support. 

Based on your requirement you want to post the data to the server side using axios in batch edit mode. Before we proceed with this query, we need the following details. 

1. Please share the complete grid code example.   

2. Have you bind local or remote data in Grid? 

3. Syncfusion Package Version. 

Regards, 
Ajith G 



CD Christian DAquino September 9, 2020 10:59 AM UTC

Hi,

Code is attached. I'm using local binded data. Package version is 18.2.56

Attachment: ResourceDemand_c00c6c38.zip


AG Ajith Govarthan Syncfusion Team September 10, 2020 02:15 PM UTC

Hi Christian, 

Thanks for the update. 

Based on the attached code example we found that you want to save the data in the grid after posting the data through axios. You can achieve your requirement by calling the batchSave method in the success function of the axios post which will remove all the temporary green colored cells and will save the data in grid datasource also.  

For your convenience we have attached the sample so please refer the sample for your reference. 

Code example: 
    
 cellSaved: function(args) { 
      var grid = document.getElementsByClassName("e-grid")[0].ej2_instances[0]; 
      console.log(args); 
      grid.editModule.batchSave();    //call this method inside the success function of the axios post 
    } 


UG-Links: 

Please get back to us if you need further assistance. 

Regards, 
Ajith G. 


Marked as answer
Loader.
Up arrow icon