Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146909 | Aug 25,2019 03:48 PM UTC | Aug 27,2019 07:26 AM UTC | Angular - EJ 2 | 1 |
![]() |
Tags: Grid |
Component.ts
import { Component, OnInit,ViewChild } from '@angular/core';
import { orderData } from './data';
import { EditService, ToolbarService, PageService,GridComponent } from '@syncfusion/ej2-angular-grids';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
providers: [ToolbarService, EditService, PageService]
})
export class AppComponent {
public data: Object[];
public editSettings: Object;
public toolbar: string[],
public pageSettings: Object;
@ViewChild("Batchgrid1",{static:true})
public grid1:GridComponent;
@ViewChild("Batchgrid2",{static:true})
public grid2:GridComponent;
@ViewChild("Batchgrid3",{static:true})
public grid3:GridComponent;
public ngOnInit(): void {
this.data = orderData;
this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'Batch' };
this.toolbar = ['Add', 'Delete'];
this.pageSettings = {pageCount: 5};
}
public Save():void{
this.grid1.editModule.batchSave();
this.grid2.editModule.batchSave();
this.grid3.editModule.batchSave();
}
} |
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.