Note that there are some explanatory texts on larger screens.

plurals
  1. POLosing edited cell data after paging
    text
    copied!<p>I'm building a completely "client side" grid however if I enable inline editing, the changes I make are lost if I change the grid page.</p> <p>Hopefully someone can point out what I'm missing</p> <p>The Grid setup is shown below along with the function I call to fill it with test data:</p> <pre><code>var myGrid; var lastgridsel; jQuery(document).ready(function() { myGrid = jQuery("#mygrid").jqGrid({ datatype: 'local', colModel: [ { name: 'AID', label: 'AID', index: 'AID', width: 100, editable: false, sorttype: "int" }, { name: 'MS', label: 'MS', index: 'MS', width: 300, editable: false }, { name: 'GROUP', label: 'GROUP', index: 'GROUP', width: 100, editable: false }, { name: 'REV', label: 'REV', index: 'REV', width: 100, editable: false }, { name: 'OPT', label: 'OPT', index: 'OPT', width: 100, editable: true, edittype: 'text' } ], pager: '#mypager', rowNum: 10, rowList: [10, 20, 500], viewrecords: true, loadonce: true, autowidth: true, sortname: 'AID', sortorder: 'desc', cellsubmit: 'clientArray', onSelectRow: function(id) { if (id &amp;&amp; id !== lastgridsel) { jQuery('#mygrid').saveRow(lastgridsel, false, 'clientArray'); jQuery('#mygrid').editRow(id, true); lastgridsel = id; } } }); }); var mydata = []; function InitNew() { for (var i = 0; i &lt; 100; i++) { mydata.push({ AID: i, MS: "123", GROUP: "456", REV: "78", OPT: "8" }); } myGrid.setGridParam({ data: mydata }).trigger("reloadGrid"); } </code></pre> <p>This shows 10 pages, 100 records. If I click the "OPT" column, I can change the value in the textbox and when I click another row, the data appears to be saved. However, once I go to another page and back to the first page, the data reverts to its original value.</p>
 

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