Uncaught exception: jqGrid - There is no such method: navGrid

jqGrid 3.8.1 worked fine than updating jqGrid 3.8.2. The code started to generate an error. Error: uncaught exception: jqGrid - there is no such method: navGrid. Below is my code.

Note. If I delete the line lower than the grid works fine. Why is this?

jQuery("#lists55").jqGrid('navGrid', '#pagers55', { edit: false, add: false, del: false }); 

Using it in ASP.NET MVC 3 Razor.

// My code

<link href="@Url.Content("~/Content/themes/images/jquery-ui-1.8.7.custom.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/themes/ui.jqgrid.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/js/jquery-ui-1.8.7.custom.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/js/grid.locale-en.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/js/jquery.jqGrid.min.js")" type="text/javascript"></script>


jQuery().ready(function () {
    jQuery("#lists55").jqGrid({
        data: mydata1,
        datatype: "local",
        colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Notes'],
        colModel: [{ name: 'id', index: 'id', width: 55 },
            { name: 'invdate', index: 'invdate', width: 90 },
            { name: 'name', index: 'name asc, invdate', width: 100 },
            { name: 'amount', index: 'amount', width: 80, align: "right", formatter: 'number' },
            { name: 'tax', index: 'tax', width: 80, align: "right", formatter: 'number' },
            { name: 'total', index: 'total', width: 80, align: "right", formatter: 'number' },
            { name: 'note', index: 'note', width: 150, sortable: false }
        ],
        rowNum: 10,
        rowList: [10, 20, 30],
        pager: '#pagers55',
        sortname: 'id',
        viewrecords: true,
        sortorder: "desc",
        caption: "JSON Example",
        footerrow: true,
        userDataOnFooter: true,
        altRows: true
    });
    jQuery("#lists55").jqGrid('navGrid', '#pagers55', { edit: false, add: false, del: false }); 
});
+5
source share
2 answers

I assume that you did not check all the jqGrid modules you need during the jqGrid dounload . The function navGridis mainly used for form editing functionality. Therefore, you should check the "Edit Form" and "General" modules from the "Edit" block.

, jquery.jqGrid.min.js, , ( , 8),

Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; ...

grid.formedit.js, " " jqGrid.

+13

, Google, , jqGrid:

grid.addons.js script

<script src="plugins/grid.addons.js" type="text/javascript"></script>

, , .

+1

All Articles