相关疑难解决方法(0)

jqgrid未定义整数?寻呼机未加载

IM在mvc4上使用jqgrids,我需要获得一个简单的列表并使用Ajax显示它.

当我加载页面然后网格启动Ajax调用时,我在网格上只有2列,user_id和name.

加载Json后,我在Google Chrome上遇到下一个错误:

未捕获的排字机:无法读取未定义的属性"整数"

在firefox中,firebug:

TypeError:b.jgrid.formatter未定义

在jquery.jqGrid.src.js上:122

并且网格显示"未定义"的消息,同时,当前的寻呼机控件没有加载,但数据是

 <table id="GridUsuarios"></table>
    <div id="PagerUsuarios"></div>


  <script type="text/javascript"> 
        $(document).ready(function() {
            jQuery("#GridUsuarios").jqGrid({
                url: '@Url.Action("UsuariosGridData","Usuarios")',
                datatype: "json",
                myType: 'GET',
                contentType: "application/json; charset-utf-8",                
                colNames: ['Usuario', 'Nombre'],
                colModel: [
                    { name: 'user_id', index: 'user_id', width: 90},
                    { name: 'nombre', index: 'nombre', width: 200}
                ],
                pager: '#PagerUsuarios',
                rowNum: 10,
                rowList: [10, 20, 30],
                viewrecords: true,
                height: 'auto',
                sortname: 'nombre',
                sortorder: 'desc',
                caption: "Usuarios",
                jsonReader: {
                    root: "rows",
                    total: "total",
                    page: "page",
                    records: "records",
                    repeatitems: false,
                    id: "user_id"
                }, …
Run Code Online (Sandbox Code Playgroud)

pagination json jqgrid

13
推荐指数
1
解决办法
1万
查看次数

标签 统计

jqgrid ×1

json ×1

pagination ×1