title: jqGrid: Combining sortableRows and gridDnD (Duplicate Rows)
body: <p>I want to be able to drag items from Grid1 to Grid2 and then allow the user to sort the items of Grid2. Individually, the sortableRows option and gridDnd options work without issue. When both integrations are used together and the user sorts the rows within Grid2, the rows are duplicated as if they were dragged from Grid1.</p>
  
  <p>Using jquery 1.4.4, jqueryui 1.8.10, jqGrid 4.2
  Here is some sample code demonstrating the issue:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function () {
      // Creating grid1
      jQuery("#grid1").jqGrid({
          datatype: "local",
          height: 100,
          colNames: ['Id1', 'Name1', 'Values1'],
          colModel: [
             {name: 'id1', index: 'id',width: 100}, 
             {name: 'name1',index: 'name',width: 100},
             {name: 'values1',index: 'values',width: 200}
          ],
          caption: 'Grid 1',
          pager: '#pgrid1'
      });
  
      // Creating grid2
      jQuery("#grid2").jqGrid({
          datatype: "local",
          height: 'auto',
          colNames: ['Id2', 'Name2', 'Values2'],
          colModel: [
             {name: 'id2',index: 'id',width: 100},
             {name: 'name2',index: 'name', width: 100},
             {name: 'values2',index: 'values',width: 200}],
          caption: 'Grid 2',
          pager: '#pgrid2'
      });
  
      // Data for grid1
      var mydata1 = [
          {id1:"1",name1:"test1",values1:'One'},
          {id1:"2",name1:"test2",values1:'Two'},
          {id1:"3",name1:"test3",values1:'Three'}
      ];
  
      // Data for grid2
      var mydata2 = [
          {id2:"11",name2:"test11",values2:'One1'},
          {id2:"21",name2:"test21",values2:'Two1'},
          {id2:"31",name2:"test31",values2:'Three1'}
      ];
  
      // Adding grid data
      for (var i = 0; i &lt;= mydata1.length; i++) {
          jQuery("#grid1").jqGrid('addRowData',i + 1, mydata1[i]);
          jQuery("#grid2").jqGrid('addRowData',i + 1, mydata2[i]);
      }
  
      // connect grid1 with grid2
      jQuery("#grid1").jqGrid('gridDnD',{connectWith:'#grid2'});
      // make grid2 sortable
      jQuery("#grid2").jqGrid('sortableRows');
  
  });
  
  &lt;/script&gt;
  &lt;table id="grid1"&gt;
      &lt;tr&gt;
          &lt;td /&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;table id="grid2"&gt;
      &lt;tr&gt;
          &lt;td /&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>