Hi Tarik,
Greetings from Syncfusion support.
Based on the query we could understand that you are performing search on the Grid before updating the batch changes in the Grid. We would like to let you know that the Grid’s batch editing functionality allows to perform multiple CRUD actions like add, edit, delete on the Grid rows and on performing each action the changes will be pushed into a batch changes variable within the source. Because of this the save action will not be called after performing each edit as user can perform multiple CRUD actions and save the changes as a whole. So when each change occurs it will only be updated in a virtual storage and not affect the Grid’s data source. Only when the save action is performed these changes are updated to the Grid’s data source. This is the default behavior of the batch edit functionality of the Grid.
So in your case since you are searching the Grid without saving the changes it will be removed from the Grid by default. However in this case, the Grid will show an alert dialog which allows to save the changes as shown in the below image,
Please check this behavior in the below EJ2 Grid(JavaScript) sample for your reference,
So we suggest you to save the changes in the Grid before performing search action by either updating changes with the above shown alert dialog, manually clicking the ‘Update’ toolbar button(which can be checked in this online demo sample for reference) or by calling the edit module’s batchSave method as demonstrated in the below code snippet,
function onClick() {
var gridObj = document.getElementById('Grid').ej2_instances;
gridObj.editModule.batchSave();
} |
Please get back to us if you require any further assistance.
Regards,
Sujith R