title: JQGrid: Sorting & Custom formatters
body: <p>So I have a jqgrid, and I use custom formatters to format the collumns, anyway when I click on a collumn head to sort, it sorts the collumns as expected but it removes the formatting I did, and instead puts "[object Object]" into the collumns where the formatter should have done its work.</p>
  
  <p>The particular formatter is:</p>
  
  <pre><code>function(cellVal, options, rowObject){
      var optsURI = '../webrelease/common/images/page_v2_u'+(rowObject.opt2Up==2?1:0)+'_s'+(rowObject.optDuplex?1:0)+'_c'+(rowObject.optColor?1:0)+'_52.png';
      return $('&lt;img class="finishing_icon" height="40" src="'+optsURI+'" /&gt;').attr('jobid', rowObject.jobid).click(finishingOptsCycle);
  }
  </code></pre>
  
  <p>This seems to work well for removing and adding rows, but as soon as I hit resort the collumn changes from an image to a string [object Object]</p>
  
  <p>Any ideas on how I can resolve this?</p>
  
  <p>for completeness here is my entire jqgrid (excl rows &amp; formatter):</p>
  
  <pre><code>grid.jqGrid({
      datatype: "local",
      editurl: "clientArray",
      width: 680,
      height: 290,
      colNames: [...],
      colModel: [...],
      hidegrid: false,
      shrinkToFit:false,
      multiselect: true,
      scroll:1,
      loadui: "block",
      loadtext: "Loading job list...",
      caption: 'Job List &lt;img class="refreshbutton" width="20" height="20" src="../webrelease/desktop/images/icon_circle_arrow_right.png" /&gt;',
      pager: '#jqgrid_pager',
      onSelectRow: rowSelect,
      onSelectAll: allRowsSelect
  });
  </code></pre>