本文介绍了jqgrid分页-始终显示0的1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在尝试在我的jqgrid上进行分页工作,但是它始终显示为"0之1",我正在使用addRowData加载数据以在网格上填充数据.

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]);

返回的数据格式为:

{总计:'1',记录:'10',页面:'1',行:[{'name':股票市场入门指南"}]

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

任何帮助将不胜感激

推荐答案

在刷新jqGrid分页器时您遇到了一个老问题,请参见),或者jqGrid 3.8中存在一些新问题.

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.

在创建jqGrid之前尝试将所有数据填充到一个对象myData中,并使用data: myData jqGrid选项.

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

如果继续遇到问题,则应在问题后附加jqGrid代码和JavaScript代码,这些代码将数据填充到jqGrid中.

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.

这篇关于jqgrid分页-始终显示0的1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 02:05