FRO
FRO

Reputation: 253

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, the total of page is set to 2 and it's perfect.

How can I make it works fine?

Thank you very much

Upvotes: 1

Views: 863

Answers (1)

RoccoC5
RoccoC5

Reputation: 4213

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.

Upvotes: 1

Related Questions