We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Batch Edit



Is it possible to save changes to each row in the grid after moving to the next one, instead of saving the entire batch? 

1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team April 3, 2017 11:57 AM UTC

Hi Avi Segal, 

Thanks for contacting syncfusion support. 

We have achieved your requirement “save changes to each row in the grid instead of saving the entire batch” using “CellSave” event of the grid. In the cellSave event, we can get the batch changes by using “getBatchChanges” method and finally save the records in the “batchSave” method instead of saving the entire batch. CellSave event will be triggered at each cell save. If you have called the batchSave method within this event, it will update the Grid DataSource instantly. 

Please refer the API reference link:- 

Please refer to the code example:- 

     .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Batch); }) 
     .ToolbarSettings(toolbar =>{ 
                        toolbar.ShowToolbar().ToolbarItems(items => 
   .ClientSideEvents(eve => { eve.CellSave("cellsave"); }) 
   .Columns(col => 
       col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Add(); 
       col.Field("CustomerID").HeaderText("Customer ID").Add(); 
        .  .  . 
<script type="text/javascript"> 
    var flag = true; 
    function cellsave(args) { 
        if (flag) { 
            args.cancel = true; 
            if ($.inArray(args.rowData, this.batchChanges.changed) == -1 && $.inArray(args.rowData, this.batchChanges.added) == -1) 
            var batchData = this.getBatchChanges(); 
            var batchDetails = this._bulkEditCellDetails; 
            if (batchData.added.length > 0 || batchData.changed.length > 0 || batchData.deleted.length > 0) { 
                flag = false; 
                this._bulkEditCellDetails = batchDetails;//reassigning the values  
            flag = true; 


Farveensulthana T 

Live Chat Icon For mobile
Up arrow icon