Batch edit - changes are not preserved

Hi,

We're using Syncfusion grid control with batch edit option. One of the columns is of type bool and we've set the DisplayCheckBox option as true and also EditingType is set to BooleanEdit.

During initial edit, while enabling / disabling the checkbox the changed rows are retrieved properly. But after making multiple changes to same / different rows, the edited rows are not retrieved correctly when using the below command.

    $("#Grid").data("ejGrid").getBatchChanges();

  • How to set the grid cell/row in batch edit mode programmatically?
  • Is this a bug because after multiple edits the getBatchChanges does not retrieve all edited rows and loses old values?
  • We're using the below command to mark all rows as checked, is it causing any conflict?


  •     var gridObj = $("#Grid").ejGrid("instance");
        $(gridObj.model.currentViewData).each(function(i) {          
                    gridObj.setCellValue(i, "Status", true);
        });

    Thanks for your help.


    1 Reply

    SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 26, 2018 12:01 PM UTC

    Hi Ajay,  
     
    Thanks for Contacting Syncfusion Support.  
     
    We could see you are using the Boolean column in the Batch editing mode along with the setCellValue method for the programmatic update of the records. Usually, the Grid will push updated records to the changed property of the getBatchChanges method. Later, if the same records were updated with the previous value/original existing value, Grid will splice respective record from the changed property of the getBatchChanges method. This is default behavior of the Grid.  
     
    And the code that you have used with setCellValue method is correct and it will update the records programmatically from the external action. Please share the following details to analyze the reported problem at our end.  
     
    1. Replication procedure with the screenshot or video demo of the issue
    2. Complete code example of the Grid along with the custom script used
    3. Version of the Essential Studio.
    4. Open the console after rendering the grid in browser and follow the steps
      1. Run the cmd JSON.stringify($(‘.e-grid’).ejGrid(“model”))
      2. Copy string the returned string in the text file
     
     
     
    Regards,  
    Seeni Sakthi Kumar S. 


    Loader.
    Up arrow icon