Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have many small syntax errors:</p> <ul> <li>The usage of trailing comma (like ',}') is a syntax error. You have to remove trailing comma from JSON data and from <code>colNames</code> and <code>colModel</code>. The <code>"rowId": 13,}</code> and <code>"rowId": 14,}</code> can't be read.</li> <li>You define <code>jQuery("#testGrid")</code>, but use <code>jQuery("#mainReportGrid")</code> to set the footer.</li> <li>The <code>url: 'local'</code> or any other <code>url</code> parameter has no sense in case of <code>datatype: 'local'</code>. The <code>url</code> parameter will be just ignored (not used) in case of <code>datatype: 'local'</code>.</li> <li>You use <code>myGrid</code> which you not defined in the posted code. Either you should define <code>var myGrid = jQuery("#testGrid");</code> somewhere at the beginning of your code or define <code>var myGrid = $(this);</code> at the beginning of <code>loadComplete</code> event handler.</li> <li>You use <code>now.format('M j, Y')</code> and not post the extension method <code>format</code> of the <code>Date</code>. You can use jqGrid method instead: <code>return $.fmatter.util.DateFormat(undefined, now, 'M j, Y', $.jgrid.formatter.date);</code>.</li> <li>I recommend you to use strict equality <code>===</code> always instead of <code>==</code> and <code>!==</code> instead of <code>!=</code>. Read for example <a href="http://www.jslint.com/lint.html#eqeq" rel="nofollow noreferrer">here</a> for more information.</li> <li>I recommend you to use <code>height: 'auto'</code> or <code>scrollOffset: 0</code> if you use jqGrid <em>without</em> having scroll bars.</li> <li><p>I recommend you to read <a href="https://stackoverflow.com/questions/7642433/jqgrid-click-local-data-column-sort-client-side-only-wipes-userdata-on-grid-ref/7658590#7658590">the answer</a>. If you use the described bug fix you can modify the line <code>jq("#mainReportGrid").jqGrid("footerData","set",userDataTotals,false);</code> to the line</p> <p><code>myGrid.jqGrid("footerData", "set", myGrid.jqGrid('getGridParam', 'userData'), false);</code></p> <p>The variable <code>userDataTotals</code> will be not needed and the method <code>userdata</code> from the <code>userdata</code> can be defined as</p> <p><code>userdata: function (obj) { return { outboundReadyDate: obj.totalOutBounded, outboundDate: obj.totalOutBoundReady }; }</code></p></li> </ul> <p>You can see <a href="http://www.ok-soft-gmbh.com/jqGrid/SimpleLocalGridWithUserDataCustomFormatter.htm" rel="nofollow noreferrer">here</a> modified version of your code.</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