Similar to the drag and drop feature in treegrid
http://www.jeasyui.com/forum/index.php?topic=575.0, it is possible to extend a 'enableDnd' method to drag and drop rows in datagrid. Please include 'datagrid-dnd.js' in page head.
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../themes/icon.css">
<script type="text/javascript" src="../jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../jquery.easyui.min.js"></script>
<script type="text/javascript" src="../datagrid-dnd.js"></script>
Call 'enableDnd' method to enable drag and drop feature in datagrid.
$('#dg').datagrid({
onLoadSuccess:function(){
$(this).datagrid('enableDnd');
},
onDrop:function(destRow,sourceRow,point){
console.log(destRow);
console.log(sourceRow);
console.log(point);
}
});