Note that there are some explanatory texts on larger screens.

plurals
  1. POjqGrid: new data property in 3.7 -- is there a setData method?
    primarykey
    data
    text
    <p>My app populates a jqGrid, over and over again, with the results of many different queries the user may make; the queries take the form: give me title, documentCategory, hits, documentType for all documents where the document contains the word 'x'. The user may make many such (ajax) queries, one after the other: Issue query. Read the list of titles returned by the database. Do some work. Make another such query. And so on and so on.</p> <p>I create the grid once, and when the ajax database call returns with some data, the grid is first depopulated and then repopulated, like this:</p> <pre><code> $("#titles-table").jqGrid('clearGridData'); . . . // loop through the data returned by the ajax database call for (var i = 0 ... { row = ... $("#titles-table").jqGrid('addRowData',i, row); } </code></pre> <p>But now with version 3.7, the grid has a new 'data' property that is supposedly faster than <strong>addRowData</strong>. The examples demonstrating this new <em>data</em> property show the grid being populated as it is being instantiated (as the <em>colModel</em> is defined, etc etc). But assuming the grid <em>already exists</em> and will be depopulated with a <strong>clearGridData</strong> call, is there then a way to set the grid's <em>data</em> property to repopulate the grid? Something analogous to clearGridData, like this:</p> <pre><code> $(#titles-table).jqGrid('setGridData', data); </code></pre> <p>I am interested in a faster way to populate the grid. Firefox displays the "script taking too long" message when my grid has 75 rows, but Chrome and Opera and Safari blaze right thru this amount of data instantly.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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