开发者

jqGrid: loadonce option disable the total parameter

When i'm using the parameter loadonce: true in my jqGrid, when I'm getting this json result:

{ page: 1, records: 10, rows: […], total: 2

jqGrid display a total of 1 page! But if I disable the loadonce option, t开发者_如何学JAVAhe total of page is set to 2 and it's perfect.

How can I make it works fine?

Thank you very much


I would say that this is by design. The definition of the loadonce property, per the documentation is:

If this flag is set to true, the grid loads the data from the server only once (using the appropriate datatype). After the first request the datatype parameter is automatically changed to local and all further manipulations are done on the client side. The functions of the pager (if present) are disabled.

so, when loadonce is set to true, you will only load a single page from the server. The only data that is now available is that which was loaded, so there is no page 2.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜