|
export class AppComponent {
.
.
public ngOnInit(): void {
this.pageSettings = { pageSize: 5 };
let state = { skip: 0, take: 5 };
// Async pipe service is executed with the specified ‘skip’ and ‘take’ values
this.service.execute(state);
}
} |
|
// Grid’s dataStateChange event function
public dataStateChange(state: DataStateChangeEventArgs): void {
// Async pipe service is executed with the current state
this.service.execute(state);
} |
|
<ejs-grid [dataSource]='data | async' allowPaging='true' [pageSettings]='pageSettings' allowSorting='true' allowGrouping='true' (dataStateChange)='dataStateChange($event)'>
</ejs-grid> |
|
public dataStateChange(state: DataStateChangeEventArgs): void {
this.service.execute(state);
} |