Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
987 views
in Technique[技术] by (71.8m points)

jquery - jqgrid error - b.jgrid.jqID is not a function

I'm trying to get started with the jQuery plugin, jqGrid, however it's giving me the error - "b.jgrid.jqID is not a function". I downloaded the plugin from http://www.trirand.com/blog/?page_id=6 with all features included and am referencing both jquery.jqGrid.min.js and grid.locale-en.js.

Here is the html:

<table id="list"></table>
<div id="pager"></div>

And here is the js:

jQuery(function () {

        jQuery("#list").jqGrid({
            url: '/admin/campus/getnearbybusinesses',
            datatype: "json",
            colNames: ['Name', 'Location'],
            colModel: [
                { name: 'Name', index: 'Name', width: 150 },
                { name: 'Location', index: 'Location', width: 150 }
            ],
            rowNum: 10,
            rowList: [10, 20, 30],
            pager: '#pager',
            sortname: 'Name',
            viewrecords: true,
            sortorder: "asc",
            caption: "Businesses"
        });

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

    });
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Please try to include "i18n/grid.locale-en.js" before "jquery.jqGrid.src.js"


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...