JQuery网格寻呼机不可见

时间:2016-11-18 12:33:12

标签: javascript jquery asp.net-mvc-4 jqgrid jqgrid-asp.net

我有一个在html表上形成的Jquery网格。

我添加了网格所需的属性,包括分页器功能。我已将页面大小设置为10.

页面向上和向下翻页按钮不可见。

当我仔细观察时,我发现它是在说Page: 1 out of 1 但是在右上角又说了257条记录中的1-10条。

这是mymy html标签

<table class="table table-bordered" id="tblJQGrid"></table>
<div id="pager"></div>

这是绑定网格的代码。

$("#tblJQGrid").jqGrid(
{url: "@Url.Action("GetGeographyBreakUpData", "GeoMap")"+ "?Parameters=" + Params + "",
    datatype: "json",
    //data: { "Parameters": Params },

    mtype: 'GET',
    cache: false,
    colNames: ['Id','GeoGraphy', 'Completed', 'InProgress'],
    colModel: [
    { name: 'Id', index: 'Id', width: 20, stype: 'text',hidden:true },
    { name: 'Geography', index: 'Geography', width: 150 },
    { name: 'Completed', index: 'Completed', width: 150 },
    { name: 'InProgress', index: 'InProgress', width: 150 },
    ],
    pager:'#pager',
    jsonReader: {cell:""},
    rowNum: 10,
    sortorder: "desc",
    sortname: 'Id',
    viewrecords: true,

    caption: "Survey Status:Summary",
    scrollOffset: 0});
    $("#tblJQGrid").jqGrid('navGrid','#pager',{search:true});

关于我遗失或做错的任何建议?

1 个答案:

答案 0 :(得分:1)

尝试使用loadonce: trueforceClientSorting: true选项。