如何自定义ag-grid分页
是否可以为 Angular 自定义 ag-grid 分页。 附上自定义分页图像以供参考。
<ag-grid-angular id="myGrid" style="width: 500px; height: 500px;" class="ag-theme-alpine"
[rowData]="gridOptions.rowData"
[columnDefs]="gridOptions.columnDefs" [pagination]="true" [paginationPageSize]="paginationPageSize"
(gridReady)="onGridReady($event)" (cellClicked)="onCellClicked($event)"
[defaultColDef]="defaultColDef"
[frameworkComponents]="frameworkComponents" [allowContextMenuWithControlKey]="true"
[getContextMenuItems]="getContextMenuItems" >
</ag-grid-angular>
onPageSizeChanged(event: any) {
var value = event.target.value;
this.gridApi.paginationSetPageSize(Number(value));
}
Is it possible to customize ag-grid pagination for angular.
Attached custom pagination image for reference.
<ag-grid-angular id="myGrid" style="width: 500px; height: 500px;" class="ag-theme-alpine"
[rowData]="gridOptions.rowData"
[columnDefs]="gridOptions.columnDefs" [pagination]="true" [paginationPageSize]="paginationPageSize"
(gridReady)="onGridReady($event)" (cellClicked)="onCellClicked($event)"
[defaultColDef]="defaultColDef"
[frameworkComponents]="frameworkComponents" [allowContextMenuWithControlKey]="true"
[getContextMenuItems]="getContextMenuItems" >
</ag-grid-angular>
onPageSizeChanged(event: any) {
var value = event.target.value;
this.gridApi.paginationSetPageSize(Number(value));
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要创建自定义分页面板,您必须执行以下两件事:
设置
suppressPaginationPanel=true
以告诉网格不显示分页的默认控件,如 文档创建一个 自定义状态栏面板来设计您的分页面板您的要求。请注意,这是一项企业功能,因此如果您拥有 AG Grid 许可证,您可以通过 Zendesk 联系团队以获得进一步的支持。
To create a customised pagination panel, you have to do the following two things:
Set
suppressPaginationPanel=true
to tell the grid to not show the default controls for pagination, as shown in the documentationCreate a Custom Status Bar Panel to design your pagination panel as per your requirements. Note that this is an enterprise feature, so if you have a AG Grid license, you could contact the team via Zendesk for further support on this.