如何获取行计数jqGrid? [英] How to get row count for jqGrid?

查看:150
本文介绍了如何获取行计数jqGrid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何获取jqGrid的行数。我使用 rowNum:-1 ,所以它显示所有的行。我尝试使用:

I would like to know how to get row count for jqGrid. I'm using rowNum: -1 so it displays all the rows. I tried using:

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

但它总是返回 0

感谢您的帮助。

推荐答案

尝试:

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



< http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options =nofollow noreferrer> jqGrid文档:

重新计数整数):

返回网格中的确切行数






注释,您需要使用 getGridParam 方法和 records 选项来检索所有行的计数使用分页。


Note also that, as Mike commented, you need to use the getGridParam method with the records option to retrieve a count of all the rows if you are using pagination.

这篇关于如何获取行计数jqGrid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆