Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery.jqGrid.min.js is not working
    text
    copied!<p>I have used 3.8.2 JQGrid file jquery.jqGrid.min.js which is only needed file with all the modules in it which will be selected from there side while downloading which is not working with one of the error = }).navGrid is not a function.</p> <p>I than downloaded tonytomov-jqGrid-c3a2a2d folder from <a href="http://github.com/tonytomov/jqGrid/tree/master" rel="nofollow">http://github.com/tonytomov/jqGrid/tree/master</a> and used it which has path to all the modules residing in js folder and working fine. Below is the jquery.jqGrid.js file from github. I know jquery.jqGrid.js is for development purpose but jquery.jqGrid.min.js not working for me at all.</p> <p>Why is that?. I have experimented alot and thats what I have found. May be I am missing something.</p> <pre><code>//This file should be used if you want to debug and develop function jqGridInclude() { var pathtojsfiles = "/Scripts/js/"; // need to be ajusted // set include to false if you do not want some modules to be included var modules = [ { include: true, incfile:'i18n/grid.locale-en.js'}, // jqGrid translation { include: true, incfile:'grid.base.js'}, // jqGrid base { include: true, incfile:'grid.common.js'}, // jqGrid common for editing { include: true, incfile:'grid.formedit.js'}, // jqGrid Form editing { include: true, incfile:'grid.inlinedit.js'}, // jqGrid inline editing { include: true, incfile:'grid.celledit.js'}, // jqGrid cell editing { include: true, incfile:'grid.subgrid.js'}, //jqGrid subgrid { include: true, incfile:'grid.treegrid.js'}, //jqGrid treegrid { include: true, incfile:'grid.grouping.js'}, //jqGrid grouping { include: true, incfile:'grid.custom.js'}, //jqGrid custom { include: true, incfile:'grid.postext.js'}, //jqGrid postext { include: true, incfile:'grid.tbltogrid.js'}, //jqGrid table to grid { include: true, incfile:'grid.setcolumns.js'}, //jqGrid setcolumns { include: true, incfile:'grid.import.js'}, //jqGrid import { include: true, incfile:'jquery.fmatter.js'}, //jqGrid formater { include: true, incfile:'JsonXml.js'}, //xmljson utils { include: true, incfile:'grid.jqueryui.js'}, //jQuery UI utils { include: true, incfile:'jquery.searchFilter.js'} // search Plugin ]; var filename; for(var i=0;i&lt;modules.length; i++) { if(modules[i].include === true) { filename = pathtojsfiles+modules[i].incfile; if(jQuery.browser.safari) { jQuery.ajax({url:filename,dataType:'script', async:false, cache: true}); } else { if (jQuery.browser.msie) { document.write('&lt;script charset="utf-8" type="text/javascript" src="'+filename+'"&gt;&lt;/script&gt;'); } else { IncludeJavaScript(filename); } } } } function IncludeJavaScript(jsFile) { var oHead = document.getElementsByTagName('head')[0]; var oScript = document.createElement('script'); oScript.setAttribute('type', 'text/javascript'); oScript.setAttribute('language', 'javascript'); oScript.setAttribute('src', jsFile); oHead.appendChild(oScript); } } jqGridInclude(); </code></pre> <p>//My Js</p> <pre><code>jQuery().ready(function () { var lastSel; jQuery("#sandgrid").jqGrid({ url: '/JQSandbox/MyGridData/', datatype: 'json', mtype: 'POST', height: 255, width: 640, colNames: ['Index', 'Name', 'City', 'State'], colModel: [ { name: 'companyID', index: 'companyID', width: 5 }, { name: 'companyName', index: 'companyName', width: 30 }, { name: 'companyCity', index: 'companyCity', width: 30 }, { name: 'companyState', index: 'companyState', width: 4, sortable: false}], pager: jQuery('#sandgridp'), rowNum: 5, rowList: [5, 10, 20, 50], sortname: 'companyID', sortorder: "desc", viewrecords: true, altRows: true, caption: 'Sandbox Grid', ondblClickRow: function (id) { if (id &amp;&amp; id !== lastSel) { jQuery('#sandgrid').restoreRow(lastSel); lastSel = id; alert("You've seleted " + id); } }, subGrid: true, subGridUrl: '/JQSandbox/MySubGridData/', subGridModel: [ { name: ['Name', 'Department', 'Hire Date', 'Supervisor'], width: [80, 20, 80, 10], align: ['left', 'left', 'left', 'center'], params: ['companyID'] }] }).navGrid('#sandgridp', { edit: false, add: false, del: false }); }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload