Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It seems for me that you should just use <code>try - catch</code> block over jqGrid code:</p> <pre><code>try { // create the grid $("#list").jqGrid({ // all jqGrid options }); } catch (err) { // display the error message which you want alert(err); } </code></pre> <p><strong>UPDATED</strong>: You are right, the <code>try {...} catch (err) {...}</code> which I described before work in IE only with reading local data. In case of getting data from the server the exception take place inside of <code>success</code> callback of <code>$.ajax</code>. To be exactly it take place inside of <code>addJSONData</code> or <code>addXmlData</code> depend of the type of data which you use. To catch the exception you should modify code of jqGrid in <a href="https://github.com/tonytomov/jqGrid/blob/v4.2.0/js/grid.base.js#L1717" rel="nofollow">the place</a>. The modified code can be about the following</p> <pre><code>success:function(data,st, xhr) { if ($.isFunction(ts.p.beforeProcessing)) { ts.p.beforeProcessing.call(ts, data, st, xhr); } try { if(dt === "xml") { addXmlData(data,ts.grid.bDiv,rcnt,npage&gt;1,adjust); } else { addJSONData(data,ts.grid.bDiv,rcnt,npage&gt;1,adjust); } if(lc) { lc.call(ts,data); } if (pvis) { ts.grid.populateVisible(); } } catch (err) { alert(err); } if( ts.p.loadonce || ts.p.treeGrid) {ts.p.datatype = "local";} data=null; if (npage === 1) { endReq(); } } </code></pre> <p>I tested in <a href="http://www.ok-soft-gmbh.com/jqGrid/SK11__.htm" rel="nofollow">the demo</a> the corresponding modified version of jquery.jqGrid.src.js which display error message. I don't reproduced exactly the error which you described so the error message is a little other as in your case.</p> <p>If you need minimized version of the modified jquery.jqGrid.src.js file you can produce it yourself with any JavaScript minimizer. For example <a href="http://ajaxmin.codeplex.com/" rel="nofollow">Microsoft Ajax Minifier</a> can be free downloaded and installed. The usage as</p> <pre><code>ajaxmin.exe jquery.jqGrid.src.js -out jquery.jqGrid.min.js </code></pre> <p>will produce the new minimized version of jquery.jqGrid.src.js which will be even a little smaller as the original jquery.jqGrid.min.js.</p> <p>Another good minimizer is available online <a href="http://closure-compiler.appspot.com/home" rel="nofollow">here</a>. You should use "Simple" Optimization only.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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