jqgrid需要帮助

is there way to check grid load complete or not with a separate function?

what im trying to do is auto click on first row and add that row to second grid once this happen

jQuery("#search_grid").jqGrid('setGridParam',{url:"s_search.php?nm_mask="+nm_mask,page:1}).trigger("reloadGrid");
$('#search_grid tbody:first-child tr:nth-child(2)').dblclick();

problem im facing is it select the first row of old data not the new searched data. so i tried to use settimeout but with the load time, it seems not a good idea to use settimeout

so is there way to check setGridParam completed and then run second line?

sorry for the language errors. hope someone can understand my question

Regards

If you need do some action after the grid have been loaded you should place the action inside of loadComplete event handler.

There are another internal parameter $('#search_grid')[0].grid.hDiv.loading which will be set to true during the grid loading. I think that you should not use it and use more simple and easy loadComplete.