Kendo 网格,如何更改 Angular(页数、项目数)中的可分页文本?
Kendo Grid, how to change pageable text in Angular(count of pages, items)?
是否可以更改Angular中Kendo网格分页区域的文本?我需要自定义物品。
使用自定义消息组件,并将选项绑定到输出字符串:
<kendo-grid [kendoGridBinding]="gridData" [pageSize]="1" [pageable]="true">
<kendo-grid-column field="ProductID" title="ID" width="40">
</kendo-grid-column>
<kendo-grid-column field="ProductName" title="Name" width="250">
</kendo-grid-column>
<kendo-grid-column field="UnitPrice" title="Price" width="80" format="{0:c}">
</kendo-grid-column>
<ng-template kendoPagerTemplate let-totalPages="totalPages" let-currentPage="currentPage">
<kendo-pager-prev-buttons></kendo-pager-prev-buttons>
<kendo-pager-numeric-buttons [buttonCount]="10"></kendo-pager-numeric-buttons>
<kendo-pager-next-buttons></kendo-pager-next-buttons>
<kendo-pager-info></kendo-pager-info>
Current page: {{ currentPage }}
</ng-template>
<kendo-grid-messages [pagerItemsPerPage]="'custom items per page text'" [pagerItems]="'custom items text'"
[pagerOf]="'custom of text'" [pagerPage]="'custom Page text'">
</kendo-grid-messages>
</kendo-grid>
stackblitz 示例:https://stackblitz.com/edit/angular-ckwaam-g1dsj6
文档:
是否可以更改Angular中Kendo网格分页区域的文本?我需要自定义物品。
使用自定义消息组件,并将选项绑定到输出字符串:
<kendo-grid [kendoGridBinding]="gridData" [pageSize]="1" [pageable]="true">
<kendo-grid-column field="ProductID" title="ID" width="40">
</kendo-grid-column>
<kendo-grid-column field="ProductName" title="Name" width="250">
</kendo-grid-column>
<kendo-grid-column field="UnitPrice" title="Price" width="80" format="{0:c}">
</kendo-grid-column>
<ng-template kendoPagerTemplate let-totalPages="totalPages" let-currentPage="currentPage">
<kendo-pager-prev-buttons></kendo-pager-prev-buttons>
<kendo-pager-numeric-buttons [buttonCount]="10"></kendo-pager-numeric-buttons>
<kendo-pager-next-buttons></kendo-pager-next-buttons>
<kendo-pager-info></kendo-pager-info>
Current page: {{ currentPage }}
</ng-template>
<kendo-grid-messages [pagerItemsPerPage]="'custom items per page text'" [pagerItems]="'custom items text'"
[pagerOf]="'custom of text'" [pagerPage]="'custom Page text'">
</kendo-grid-messages>
</kendo-grid>
stackblitz 示例:https://stackblitz.com/edit/angular-ckwaam-g1dsj6
文档: