Lost all changes after search or export data

I've used DataGrid with below EditSettings:


       {
                allowEditing: true,
                allowAdding: true,
                allowDeleting: true,
                mode: 'Batch',
                newRowPosition: 'Bottom',
                showConfirmDialog: false,
                showDeleteConfirmDialog: false,
                allowNextRowEdit: true,
            }


When I try to export data (Excel, Pdf, CSV) or use the search box, all changes (Added, Deleted, Edited rows) have been gone!

3 Replies 1 reply marked as answer

BS Balaji Sekar Syncfusion Team March 10, 2021 06:21 AM UTC

Hi Fereydoon, 
 
Greetings from the Syncfusion support. 
 
We have validated your query with provided the information and we suspect that you have export the Grid with CRUD actions(Add/Edit/Delete) changes in the Grid using Batch editing. In Batch edit, we can perform the bulk add, edit and delete operations in Grid UI when we save that changes to the Grid using update toolbar button it will affect the Grid’s dataSource until then we can see that change in Grid’s UI alone it is cause of the reported problem(you have export the Grid before save the changes to Grid’s dataSource). 
 
We have video demonstration of CRUD operations with Exporting(Excel/PDF/CSV) as given below. 
 
 
 
Please get back to us, if you need further assistance. 
 
Regards, 
Balaji Sekar 


Marked as answer

FK Fereydoon Karimi March 15, 2021 11:53 AM UTC

Yes, you right about exporting data. but II have this problem with the search. When I edit some data and use the search box, all changes have been gone!



BS Balaji Sekar Syncfusion Team March 16, 2021 11:24 AM UTC

Hi Fereydoon, 

Based on your query we suspect that you have perform the Search operation before save the changes into Grid’s dataSource(changes apply on Grid UI alone). By default in EJ2 Grid, perform the search operation based on Grid’s dataSource since you lose the changes in the Grid component. We suggest you to save the updated value into grid’s dataSource then you will perform the Search operation with updated value. 

If you facing same problem, please share the replicated sample with video demonstration to us that will help to validate further. 

Regards, 
Balaji Sekar  


Loader.
Up arrow icon