title: jqGrid > datatype : "local" > get and save (at once) all edited cells of a column?
body: <p>I have a grid with a <code>datatype = "local"</code>. The data are an array as follows:</p>
  
  <pre><code>var mydata = [{id:1,valeur:"a_value",designation:"a_designation"}, {id:2,...}, ...];
  </code></pre>
  
  <p>The second column (named <strong>valeur</strong>) is the only editable column of the grid (<code>editable:true</code> set in <code>colModel</code>)</p>
  
  <p>In the pager of the grid, I have 2 buttons:</p>
  
  <ul>
  <li><p>One to edit all cells (at once) of the column named <strong>valeur</strong>:</p>
  
  <pre><code>$("#mygrid").jqGrid('navButtonAdd','#pager',{caption:"Edit values",
  onClickButton:function(){ var ids = $('#mygrid').jqGrid('getDataIDs');
  for(var i=0;i&lt;ids.length+1;i++){ $('#mygrid').jqGrid('editRow',ids[i],true);}
  }});
  </code></pre></li>
  <li><p>and another one to save (at once) all the changes of the edited cells:</p>
  
  <pre><code>$("#mygrid").jqGrid('navButtonAdd','#pager',{caption:"Save changes",
  onClickButton:function(){var ids = $('#mygrid').jqGrid('getDataIDs');
  for(var i=0;i&lt;ids.length+1;i++){ 
     ... ??? ...
  }}});
  </code></pre></li>
  </ul>
  
  <p>When I use:</p>
  
  <pre><code>var rd = $("#mygrid").jqGrid('getRowData',ids[i]);
  alert("valeur="+rd.valeur);
  </code></pre>
  
  <p>for each display, I get something like this: </p>
  
  <pre><code>valeur=&lt; input class="editable" role="textbox" name="valeur" id="1_valeur" style="width: 98%;" type="text"&gt; ...
  </code></pre>
  
  <ul>
  <li>So, when cells are in edition mode, all <strong>rd.valeur</strong> are an input text tag!</li>
  <li>When they are not, I get the initial values of the cells!</li>
  </ul>
  
  <p>How can I get and save all changes of this column (all cells in edition mode)?</p>