如何计算 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/