I am using a jqgrid.
I can see how many rows I have like this:
$("#grid").getGridParam("records"));
I can reload some different data like this:
$('#grid').trigger("reloadGrid");
But once I trigger the reload how do I know when it is done loading and ready for me to see how many rows it has returned?
Reload of jqGrid produce the same events as the grid load. So you can use the for example loadComplete
which are the last event which execution after the grid loading (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:events#execution_order). So the code could be
$("#grid").jqGrid({
// different parameters
loadComplete: function(data) {
alert ("records="+$("#grid").getGridParam("records"));
},
// different parameters
});
Handle the gridComplete
event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With