I am using addRowData to append the data to grid in ajax call.It displays the data correctly but on pagination it shows Page 1 0f 0 which is incorrect.
I have added rowNum:10 in jqgrid table property.
$.ajax({
     url: 'getData',
     dataType: 'json',
     success: function (data) {
                $('#grid').jqGrid('clearGridData');
                for (var i = 0; i <= data.length; i++){
                                $("#grid").jqGrid('addRowData', i + 1, data[i]);
                            }
                $('#grid').setGridParam({rowNum:$('#grid').getGridParam('rowNum')});   
                }
        });
Jqgrid table is -
$("#grid").jqGrid(
                {
                    width : 'auto',
                    height : 'auto',
                    colNames : [ 'First Name', 'Last Name'],
                    colModel : [ {
                        name : "firstName",
                        index : "firstName",
                        key:true,
                        width : 120,                                                    
                        search : true,
                        stype : "text"
                    }, {
                        name : "lastName",
                        index : "lastName",
                        width : 120,                                                    
                        search : true,
                        stype : "text"
                    },
                    multiselect : false,
                    iconSet: "fontAwesome",
                    datatype : "local", 
                    loadonce : true,                            
                    rowNum : 10,        
                    rowList : [ 10, 20, 30, 100000000 ],
                    loadtext : '', 
                    loadui : 'disable',
                    toppager:true,
                    pager : '#prowed2',
                    viewrecords : true,
                    loadComplete : function() {
                        $("option[value=100000000]").text('All');
                    },
                    gridComplete : function() {
                    }
                });
I expect data to be shown and pagination should display Page 1 of 1