jqgrid paging - always shows 0 of 1

蓝咒 提交于 2019-12-22 19:53:49

问题


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


回答1:


Either you have an old problem with refreshing of the jqGrid pager see Pagination problem in jqgrid with array data) 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.



来源:https://stackoverflow.com/questions/3768896/jqgrid-paging-always-shows-0-of-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!