jqgrid the front page
Premise: the background can not be paged, or add background pagination is too much trouble, it intends to take back the front page only need to check all the data, return to the front
jqgrid parameters need to return back
{
page: this page (first page Default = 1),
total: total number of pages (database Returns the total number / tab configuration page number of pieces of display),
records: total number of complete database queries,
rows: data database query
}
Json turn into values, return to the front end
When initialization jqgrid
Modify datatype: "local",
Add to
loadonce: true,
When the query data, loading:
. $ ( "# jqgridid") setGridParam ({url: ' request address background' });
$("#jqgridid").setGridParam({ datatype: 'json', page: 1 }).jqGrid('setGridParam', { page: 1, postData: {a:a} }).trigger("reloadGrid");