Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143578 | Mar 27,2019 03:26 PM UTC | Mar 29,2019 01:32 PM UTC | JavaScript - EJ 2 | 1 |
![]() |
Tags: Grid |
gridObj.editModule.getBatchChanges()
|
import { enableRipple } from '@syncfusion/ej2-base';
enableRipple(true);
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');
this.contentEle.append(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);
div.appendChild(span);
}
.. .
}
this.width = 'auto'
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.