Angular 2 Kendo UI网格分页位置

时间:2017-04-26 03:25:50

标签: angular kendo-ui grid

如何配置网格的分页,例如总页数,例如:在网格之前显示的8个中的第5个。

使用.insertBefore(.k-grid-content)之类的东西在以前版本的Kendo Grid上实现了它。但是对Angular 2不知道。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

将此字段用于您

的组件
import { SortDescriptor, orderBy } from '@progress/kendo-data-query';
import { GridComponent, GridDataResult, DataStateChangeEvent } from '@progress/kendo-angular-grid';



private pageSizesNumber: boolean = true;
private buttonCount: number = 5;
private pageSize: number = 10;

并在html端使用

<kendo-grid [data]="view | async"
    [pageSize]="pageSize"
    [skip]="skip"
    [pageable]="{
        buttonCount: buttonCount,
        info: info,
        type: type,
        pageSizes: [5,10,20,25,50,100],
        previousNext: previousNext
    }"
    [sortable]="true"
    [sort]="sort"
    class="input-xs">
    "Your grid column"
 </kendo-grid>