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

Grid Batch Confirm

Hi Syncfusion Team,

i have a Data grid with editmode : Batch.

When i push the "update" button on the tool bar i get a confirm dialog, how can i get the result from this dialog?

Thank you in advance.

regards Miguel Varela

1 Reply

TS Thavasianand Sankaranarayanan Syncfusion Team March 29, 2019 01:32 PM UTC

Hi Miguel, 

Thanks for contacting Syncfusion support. 

We have validated your requirement  and your can get changes/ added record from ‘getBatchChanges’ method of Grid. Please find the code example 


For batch editing we have added class  as ‘e-updatedtd’  for each update/added cells. Please find the code example for your reference. 


You can customize the confirmation dialog  through toolbarClick and dialogOpen event of Grid. Please find the code  example and sample for your reference. 

import { enableRipple } from '@syncfusion/ej2-base'; 

import { Grid, Toolbar, Edit, Page } from '@syncfusion/ej2-grids'; 
import { orderData } from './data-source'; 

* Batch Editing sample 
Grid.Inject(Edit, Toolbar, Page); 

let grid: Grid = new Grid( 
    dataSource: orderData, 
    editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'Batch' }, 
    toolbarClick: (args) => { 
      if (args.item.text === 'Update') { 
        (grid.editModule as any).dialogObj.beforeOpen = dlgOPen 
    pageSettings: { pageCount: 5 }, 
    toolbar: ['Add', 'Delete', 'Update', 'Cancel'], 
. . . 

function dlgOPen(args) { 
  let div = document.createElement('div'); 
  if ((grid.editModule.getBatchChanges() as any).addedRecords.length) { 
    let span = document.createElement('span'); 
    span.innerHTML = 'added : ' + JSON.stringify((grid.editModule.getBatchChanges() as any).addedRecords); 
.. . 
  this.width = 'auto' 

This is not meet your requirement could you please explain and share more details , screenshot  about  requirement. 


Live Chat Icon For mobile
Up arrow icon