我在jqGrid中使用tableToGrid
方法創建兩個網格。現在我想讓這兩行之間的行可以拖放。在選項中簡單添加'gridDnD' : true
不起作用。它是如何完成的?在jqGrid中組合tableToGrid和gridDnd
實施例:
<script type="text/javascript">
$(function() {
tableToGrid("#table1", { gridDnD: {connectWith: "#table2" } });
tableToGrid("#table2", { gridDnD: {connectWith: "#table2" } });
}
</script>
<table id="table1">
<thead>
<tr>
<th>Col 1</th>
<th>Col 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Val 1</td>
<td>Val 2</tr>
</tr>
</tbody>
</table>
<table id="table2">
<thead>
<tr>
<th>Col 1</th>
<th>Col 2</th>
</tr>
</thead>
</table>
已經在下面的答案:http://stackoverflow.com/questions/2819384/jqgrid-move-drag-rows –