Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141214 | Nov 29,2018 10:44 PM UTC | Dec 11,2020 11:41 AM UTC | Angular - EJ 2 | 3 |
![]() |
Tags: Grid |
[app.component.html]
<ejs-grid [dataSource]='data' allowPaging='true' height=365 [pageSettings]='initialPage' [columns] = 'columns' >
</ejs-grid>
[app.component.ts]
. . .
export class PageComponent implements OnInit {
public data: Object[];
public initialPage: Object;
public columns: Object[];
ngOnInit(): void {
this.data = data;
this.initialPage = { pageCount: 4 };
this.columns = [
{ field: 'OrderID', headerText: 'Order ID', width: 120, textAlign: 'Right' },
{ field: 'CustomerName', headerText: 'Customer Name', width: 150 },
{ field: 'OrderDate', headerText: 'Order Date', width: 130, format: 'yMd', textAlign: 'Right' },
{ field: 'Freight', width: 120, format: 'C2', textAlign: 'Right' },
{ field: 'ShipCountry', headerText: 'Ship Country', width: 150 }
]
}
}
|
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.