gpt4 book ai didi

angular - ag-grid 中的自定义页面大小

转载 作者:行者123 更新时间:2023-12-02 02:50:50 25 4
gpt4 key购买 nike

我在我的 Angular 6 应用程序中使用 ag-grid 作为表格。下面是我的网格选项 ag-grid 的配置。

  gridOptions: GridOptions = {
rowBuffer: 0,
rowSelection: "multiple",
rowModelType: "infinite",
cacheOverflowSize: 2,
maxConcurrentDatasourceRequests: 2,
infiniteInitialRowCount: 1,
maxBlocksInCache: 2
};

如通过 documentation ag-grid ,我无法找到用于无限滚动的自定义页面大小。

我的要求是页面大小为 20 IE

startRow = 0 and endRow = 20 and pageSize = 20 //my-requirement



什么 ag-grid 提供如下:

startRow = 0 and endRow = 100 and pageSize = 100 //default configuration



有什么方法可以更改 ag-grid 的默认配置。任何人都可以帮助我。!

最佳答案

使用 分页PageSize 支柱。另外不要忘记通过添加 来启用 ag-grid 分页分页 prop 并将其设置为 true。
在您的情况下,必须添加以下上述属性。

gridOptions: GridOptions = {
rowBuffer: 0,
rowSelection: "multiple",
rowModelType: "infinite",
cacheOverflowSize: 2,
maxConcurrentDatasourceRequests: 2,
infiniteInitialRowCount: 1,
maxBlocksInCache: 2,
pagination: true, // pagination properties
paginationPageSize: 10
};
您可以引用 here他们给出了一个带有 的片段分页 Prop 设置为真。

关于angular - ag-grid 中的自定义页面大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52307236/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com