首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在mvc应用程序中看不到jqgrid的分页

在mvc应用程序中看不到jqgrid的分页
EN

Stack Overflow用户
提问于 2017-01-10 14:32:27
回答 1查看 65关注 0票数 1

我有一个jqgrid

代码语言:javascript
运行
复制
<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的分页控件或搜索控件。

有人能告诉我我的代码有什么问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-01-10 15:02:48

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41562496

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档