jquery - `jqgrid` is not a function error when working in mvc4 cshtml page but working fine in aspx page -


i trying bind json format data jqgrid when trying same code in aspx page not throwing error in cshtml page page throwing error jqgrid not function.i cannt able see design of grid.my code this

<script language="javascript" type="text/javascript"> $(document).ready(function () {     var gridimgpath = 'themes/basic/images';     $("#projectlist").jqgrid({         datatype: "json",         height: 150,         colnames: ['workspacename', 'id'],         colmodel: [     { name: 'id', index: 'id', width: 600 },     { name: 'workspacename', index: 'workspacename', width: 600 },      ],         imgpath: gridimgpath,         multiselect: true,         ignorecase: true,         hidegrid: false,         caption: "workspace name",         pager: '#gridpager',         rownum: 10,         viewrecords: true,         rowlist: [10, 20, 30, 40]     });     $.ajax({         url: 'oauthverifiernew',         type: 'get',         datatype: "json",         contenttype: 'application/json; charset=utf-8',         data: {},         beforesend: function () {             alert("hello")         },         success: function (response) {             $("#projectlist").setgridparam({ data: response }).trigger("reloadgrid");         },         error: function (error) {             alert(error);           }     });     $("#projectlist").jqgrid('filtertoolbar', { stringresult: true, searchonenter: false, defaultsearch: "cn" });  }); 

error like

jqgrid not function

you not adding jqgrid.js or jqgrid file on page,

check "source" of pages, both in cshtml , aspx page

and check on browser too, if jqgrid added or not.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -