tags:

views:

31

answers:

1

I am trying to get paging work on my jqgrid, but it always reads "1 of 0", I am loading data using addRowData to populate data on my grid.

for (var i = 0; i <= mydata1[0].rows.length; i++)
  jQuery("#list").jqGrid('addRowData', i + 1, mydata1[0].rows[i]);

The data returned is in the format:

{total:'1',records:'10',page:'1',rows:[{ 'name': "Beginners Guide to the Stock Market"}]

Any help will be much appreciated

A: 

Either you have an old problem with refreshing of the jqGrid pager see http://stackoverflow.com/questions/3491963/pagination-problem-in-jqgrid-with-array-data/3495210#3495210) or you have some new problem in jqGrid 3.8.

Try to fill al the data in one object myData before creating the jqGrid and to use data: myData jqGrid option.

If you continue have problem you should append your question with the code of your jqGrid and the JavaScript code which fill jqGrid with data.

Oleg
Thanks Oleg. The link helped. I had to set the datatype: "clientside" and it worked!.
jack