title: JqGrid Traversing Through Row Data and Cell Data
body: <p>I am planning generate custom XML of the entire grid data for which i need to traverse through each row , and each cell of the grid.</p>
  
  <p>It is easy to traverse through rows as follow. The only problem i am facing is traversing through the cells as getRowData returns key value pair instead of an array.</p>
  
  <pre><code>var ids = jQuery("#jgrid").jqGrid('getDataIDs');
  //traverse the rows
  for (var i = 0; i &lt; ids.length; i++) {
      var rowdata = $("#jgrid").getRowData(ids[i]);
      var res = "";
      // Traverse the cells which does not work
      for (var j = 0; j &lt; rowdata.length; j++) {
          ...
          ....logic to generate Xml element for each cell
      }
  }
  </code></pre>
  
  <p>I dont want to hardcode column names as i plan to use it for all the grids. So the solution has to be Generic.</p>
  
  <p>Any ideas ?
  Thanks in Advance.</p>