前台分页:

    
sidePagination: "client",对应的json格式必须为:
[
  {
    "id":1,
    "name":"张三",
    "age":22
  },
  ...
]

后台分页:

    
sidePagination: "server",对应的json格式必须为:
{
   "total":20,
   "rows":[
        {
          "id":1,
          "name":"张三",
          "age":22
        },
       ...
    ]
}
 com.force.json.JSONObject json_total = new com.force.json.JSONObject();
       json_total.Put("total",200);
       json_total.Put("rows", jarray);

//在这里组建后台分页json格式
       context.Response.Write(json_total.ToString());
        context.Response.Flush();

 

posted on 2019-08-26 17:24  qqhfeng16  阅读(1658)  评论(0编辑  收藏  举报