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)
But it always returns 0
.
Thanks for the help.
Try:
$("#grid").getGridParam("reccount")
from the jqGrid documentation:
reccount (integer):
Readonly property. Returns the exact number of rows in the grid
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.