Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
144875 | May 27,2019 10:27 AM UTC | May 28,2019 12:47 PM UTC | Angular - EJ 2 | 1 |
![]() |
Tags: Grid |
<ejs-grid #Grid id='Grid' [dataSource]='parentData' [childGrid]='childGrid'>
<e-columns>
………………………………………….
</e-columns>
</ejs-grid>
……………………………………………
export class AppComponent {
@ViewChild('Grid')
public appGrid: GridComponent;
public parentData: Object[];
public childGrid: any;
public secondChildGrid: any;
ngOnInit(): void {
this.parentData = employeeData;
this.childGrid = {
dataSource: orderDatas,
queryString: 'EmployeeID',
allowPaging: true,
actionComplete: onComplete.bind(this),
editSettings: {allowEditing: true},
pageSettings: {pageSize: 6, pageCount: 5},
columns: [
{ field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 120 },
{ field: 'ShipCity', headerText: 'Ship City', width: 120 },
{ field: 'Freight', headerText: 'Freight', width: 120 },
{ field: 'ShipName', headerText: 'Ship Name', width: 150 }
]
};
}
}
function onComplete(args){
let proxy = this // this reutns appcomponent instance
this.appGrid; //here you can get the parent Grid instance.
}
|
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.