Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>On example of <a href="http://www.ok-soft-gmbh.com/jqGrid/Sam1.htm" rel="nofollow noreferrer">this demo</a> you can see the time of loading 1500 rows for your grid in case of usage of <code>gridview: true</code>.</p> <p>The most performance problem of your example are inside of <code>loadComplete</code> function. If you do need to make some modifications on the grid you should use jQuery to manipulate the grid contain. The best performance you can archive if you use DOM elements of the grid directly like in the example</p> <pre><code>loadComplete: function() { var i=0, indexes = this.p._index, localdata = this.p.data, rows=this.rows, rowsCount = rows.length, row, rowid, rowData, className; for(;i&lt;rowsCount;i++) { row = rows[i]; className = row.className; //if ($(row).hasClass('jqgrow')) { // test for standard row if (className.indexOf('jqgrow') !== -1) { rowid = row.id; rowData = localdata[indexes[rowid]]; if (rowData.amount !== "200") { // if (!$(row).hasClass('ui-state-disabled')) { if (className.indexOf('ui-state-disabled') === -1) { row.className = className + ' ui-state-disabled'; } //$(row).addClass('ui-state-disabled'); } } } } </code></pre> <p>You can see the corresponding example live <a href="http://www.ok-soft-gmbh.com/jqGrid/Sam2.htm" rel="nofollow noreferrer">here</a>.</p> <p>In the implementation of <code>loadComplete</code> function I use the fact, that jqGrid having <code>loadonce:true</code> parameter use internal parameters <code>_index</code> and <code>data</code> which can be used to access the contain of the grid. In the example I disabled the rows which not contain "200" in the <code>amount</code> column.</p> <p><strong>UPDATED</strong>: <a href="https://stackoverflow.com/a/10531680/315935">The answer</a> describes how to use <code>rowattr</code> callback to simplify the solution and to have the best performance (in case of <code>gridview: true</code> of cause).</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