Changing page in grid makes me loose the temporary batch changes

Hi ! 

I started using syncfusion a week ago and I have encountered my first deadlock. I'm using syncfusion in a .net core 2.1 project with a MVC architecture with some javascript to handle most events.

My nuget packages are as following :

 

I'm using the RemoteSaveAdaptator with a BatchUrl pointing to a local api. The list used to build the table is as shown in the class.cs file. I have no issue with loadind and saving the datas.  

My problem is that when I change page in my grid element, the unsaved changes seems to be reset to the beginning values. The same happens when I try to use the search function and the sorting function.

Starting point :


Step 1 :


Step 2:


Can't my changes be kept until I save everything ? 

Thanksfully. 

Yann Loukili



Attachment: Declaration_Parcellaire_18317373.zip

1 Reply

PS Pavithra Subramaniyam Syncfusion Team February 17, 2022 10:34 AM UTC

Hi Yann, 
 
Greetings from Syncfusion. 
 
The batch changes will be lost while doing Grid data actions like paging, sorting, etc. since these actions will refresh the Grid. This is the default behavior of Grid component. However, a confirmation popup will be shown for update the changes before these actions. But from the shared code it seems that you have disabled this behavior using “editSettings.ShowConfirmDialog” property. So, you can save the unsaved changes programmatically before doing paging, searching etc. using the endEdit method. 
 
actionBegin: (e) => { 
  if (e.requestType == 'paging' || e.requestType == 'searching' || 
    e.requestType == 'filtering') { 
    grid.endEdit(); 
  } 
} 
 
 
 
Please get back to us if you need further assistance on this. 
 
Regards, 
Pavithra S 


Loader.
Up arrow icon