gpt4 book ai didi

javascript - 如何计算 jqGrid 中的行数?

转载 作者:行者123 更新时间:2023-12-03 21:34:28 26 4
gpt4 key购买 nike

如何计算 jqGrid 中的行数?

需要澄清的是,涉及的数据并不多,因此网格在单个查询中从服务器拉回所有数据,而不是使用分页。

最佳答案

jQuery("#myGrid").jqGrid('getGridParam', 'records');

更新

请注意,有两个参数可以确定记录计数:

records

integer

Readonly property. Gives the number of records returned as a result of a query to the server.

<小时/>

reccount

integer

Readonly property. Determines the exact number of rows in the grid. Do not confuse this with records parameter. Although in many cases they may be equal, there are cases where they are not. For example, if you define rowNum to be 15, but the request to the server returns 20 records, the records parameter will be 20, but the reccount parameter will be 15 (the grid you will have 15 records and not 20).

关于javascript - 如何计算 jqGrid 中的行数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1566617/

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