In you code you call jQuery(“#jqid”).jqGrid('addRowData', i + 1, mydata); out of the
$(function() {/* not here !!!*/});
so you can try to add the data before the page are loaged and before the grid inside of $(function()…) will be created.
In case that you have the grid data in the array (mydata) you can just use data:mydata parameter of jqGrid to fill the grid with data during creating of the grid.
Best regards
Oleg