title: How to update value of data in jqgrid
body: <p>I'm trying to update a cell in jqgrid permanently upon loading.  I know I can use <code>setCell</code> but that only updates the value for that page.  If I come back to the page if I don't explicit perform another <code>setCell</code> for the cell the old value is shown.  I've also tried setRowData but it appears to be doing the same thing.  I'm using the <code>loadonce</code> as my approach is to 1) load the data 2) modify a few values of the data based on some criteria 3) show the modified values.  As I'm using <code>loadonce</code> shouldn't there be a way to modify a cell permanently in this session?</p>
  
  <p>UPDATE:</p>
  
  <p>Putting in my code that isn't giving an error but failing to iterate through all data:</p>
  
  <pre><code>var set = 0;
  
  ....
  
  gridComplete: function(data){
      setData();
  },
  
  ....
  
  beforeRefresh: function(data){
      set = 0;
  },
  
  ....
  
  function setData(){
  
  if(set == 1) return;
  ... //create hash up here
    var dataArray = jQuery("#grid").jqGrid('getGridParam', 'data');
    var j = 1;
    for (var rows in dataArray) {
      var key = dataArray[rows].name;
      dataArray[rows].level = hashTable[key];
      j++;
    }
    alert(j);
  }
  </code></pre>
  
  <p>This is not cycling through all items in the array that are locally loaded.  For example, if page size is set to 30, the <code>alert(j)</code> returns 30, despite how many items I have locally loaded.  However, if I refresh the graph the j is the correct number.  Why is the behavior of getGridParam different in each case?</p>