在我的mvc应用程序中看不到jqgrid的寻呼机

时间:2017-01-10 06:32:27

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

我有一个jqgrid

<div>
        <div >
            <table class="table table-bordered" id="tblJQGridCCVT"></table>
        </div>
</div>

$("#tblJQGridCCVT").jqGrid(
            {
                url: "@Url.Action("MyAction", "MyController")" + "?Parameters=" + Params + "",
                datatype: "json",
                mtype: 'GET',
                cache: false,
                async: false,
                colNames: ['A', 'B', 'C', 'D', 'E','F', so on...],//nearly 30 columns
                colModel: [
                {
                    name: 'A', index: 'A', width: 150, edittype: 'select', formatter: linkFmatter
                },
            { name: 'B', index: 'B', width: 150 },
            { name: 'C', index: 'C', width: 150 },
            { name: 'D', index: 'Updated By', width: 150 },
            { name: 'E', index: 'E', width: 150 },
            { name: 'F', index: 'F', width: 150 },
            So on 
            ...
            ...
            ...
                ],
                pager: $('#pager'),
                height:300,
                rowNum: 10,
                sortorder: "desc",
                sortname: 'ResponseId',
                viewrecords: true,
                sortable: true,
                loadonce: true, forceClientSorting: true,
                ignoreCase: true,
                caption: "Summary"
            });
            $("#tblJQGridCCVT").jqGrid('navGrid', '#pager', { view: false, del: false, add: false, edit: false, search: true, refreshtext: "Refresh" }, { closeOnEscape: true, multipleSearch: true, closeAfterSearch: true }, {}, {}, {});
            $("#tblJQGridCCVT").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: 'cn' });

正如您所看到的,我使用'loadonce:true'一次加载整个网格 我无法找到jqgrid的分页控件或serach控件。

有人可以告诉我我的代码是否有问题吗?

1 个答案:

答案 0 :(得分:0)

您必须使用相同的ID添加分页div检查本教程: enter link description here