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

标签 javascript jquery jqgrid

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

相关文章:

javascript - 如何链接两个文件都有 onload 事件的多个 javascript 文件?

php - 将图像放入背景图像

javascript - jQuery 用户界面 : How to pass values to dialog

jquery - 修复 JQGrid 中的 Navgrid 样式

jquery - jqGrid - 在加载时按降序对网格进行排序

javascript - 如果 jQuery 中的文本是阿拉伯语,则将类添加到文本的父级

javascript - 连接express和MySQL azure时出现问题

javascript - 这在 JavaScript 子类中不可用

javascript - HTML Link 和 Jquery Live Only Works on First Try with a click

javascript - 检测 jqGrid 单元格中的复选框事件