jqgrid event when reload is finished?
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 wh开发者_JS百科en 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.
精彩评论