简体   繁体   English

AG GRID - 在当前页面上获取具有分页和无限 model 的行

[英]AG GRID - get lines on the current page with pagination and infinite model

I want to know how to get all the nodes or rows that are in the current AG-Grid pagination.我想知道如何获取当前 AG-Grid 分页中的所有节点或行。

The closest I got to this was this.gridApi.getRenderedNodes() , but it does not bring all the lines from the current page.我最接近这个的是this.gridApi.getRenderedNodes() ,但它不会带来当前页面的所有行。

Framework website: https://www.ag-grid.com/ .框架网址: https://www.ag-grid.com/

You can get the data of your table with the API method getModel() .您可以使用 API 方法getModel()获取表的数据。 Make sure to use the filtered data.确保使用过滤后的数据。 Then, you can use the method paginationGetPageSize() to find out the currently configured page size.然后,您可以使用方法paginationGetPageSize()找出当前配置的页面大小。 Together with paginationGetCurrentPage() you can then extract the subset of rows which are on the current page.paginationGetCurrentPage()一起,您可以提取当前页面上的行子集。

See also the documentation: https://www.ag-grid.com/documentation/javascript/grid-api/另请参阅文档: https://www.ag-grid.com/documentation/javascript/grid-api/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM