gpt4 book ai didi

javascript - 如何获取 jqGrid 的行数?

转载 作者:行者123 更新时间:2023-12-03 21:43:16 31 4
gpt4 key购买 nike

我想知道如何获取 jqGrid 的行数。我正在使用 rowNum: -1 因此它会显示所有行。我尝试使用:

parseInt($("#grid").getGridParam("records"), 10)

但它总是返回0

感谢您的帮助。

最佳答案

尝试:

$("#grid").getGridParam("reccount")

来自 jqGrid documentation :

reccount (integer):

Readonly property. Returns the exact number of rows in the grid

<小时/>

另请注意,正如 Mike 所评论的,如果您使用分页,则需要将 getGridParam 方法与 records 选项结合使用来检索所有行的计数。

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

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