In mobile device, scrolling rows and drag a row use the same 'ontouchstart' event. This makes it confused to understand the operation with 'ontouchstart'. To avoid this issue, detect the mobile device and disable the dnd functionality.
If you doesn't detect the 'width' of window, please try this instead.
$('#dg').datagrid({
data: data,
singleSelect: true,
fitColumns: true,
onLoadSuccess: function(){
var isMobile = 'ontouchstart' in document.documentElement;
if (!isMobile){
$(this).datagrid('enableDnd')
}
}
})
You can also set the 'dragDelay' to a bigger value to delay the dnd when touching on a row. Make sure to download the newer file 'datagrid-dnd.js' from
https://www.jeasyui.com/extension/datagrid_dnd.php