title: jqGrid - rowObject inconsistencies?
body: <p><strong>The first page of results with a jqgrid rowObject returns expected data but then returns incomplete data for subsequent pages of results. Why?</strong></p>
  
  <p>First page of results:
  rowObject[3] will equal "2"</p>
  
  <p>Subsequent pages of results:
   rowObject[3] will equal "undefined" and returning to the first page of results will also now equal "undefined".</p>
  
  <p><strong>More details and some code:</strong></p>
  
  <p>With jqGrid, if you want to implement a custom formatter you use a parameter called rowObject that contains the row data. So for instance, one row of rowObject could be something like:</p>
  
  <pre><code>["18", "133", "Betelguese", "3", "photo.jpg", "", "0", ""]
  </code></pre>
  
  <p>So my custom formatter uses some of this data to prepare a link as follows:</p>
  
  <pre><code>var newval = '&lt;a href="/proj/' + rowObject[3] + '/images/' + imgval + '"&gt;' + imgval + '&lt;/a&gt;';
  </code></pre>
  
  <p>and this gives me a url like:</p>
  
  <pre><code>&lt;a href="/proj/3/images/photo.jpg"&gt;photo.jpg&lt;/a&gt;
  </code></pre>
  
  <p>So far so good. My problem is that when I go to the next page of results in the jqgrid I lose some of this data and get:</p>
  
  <pre><code>&lt;a href="/proj/undefined/images/photo.jpg"&gt;photo.jpg&lt;/a&gt;
  </code></pre>
  
  <p>If I load the page with all of the results displayed everything works fine, however if I use paging, only the first page of results will have the correct value for rowObject[3] while every other result on subsequent pages will not have that rowObject value!</p>
  
  <p>So why is rowObject containing the correct data on what is initially loaded into the grid and seeming to lose that data when the next page of grid results appears?</p>
  
  <p>One thing I'm seeing in Firebug that I don't understand... when the page initially loads I get:</p>
  
  <pre><code>console.log(rowObject); 
  ["18", "133", "Betelguese", "3", "photo.jpg", "", "0", ""]
  </code></pre>
  
  <p>On the next page of results, where things stop working as I expect, I see</p>
  
  <pre><code>console.log(rowObject);
  Object { photo_id="18", site_id="133", more...} 
  </code></pre>
  
  <p>Why the change? The first result is json so why am I now getting this Object?</p>