а

DnD-dhtmlXTree Not working with Touch Devices (ios/Android)


#1

Hi Team,

We are trying to achieve Drag Drop Functionality in dhtmlXTree . The functionality works fine via Desktop Browser but when the same is accessed via mobile - User is only able to select a value but not able to Drag and drop the value to a different hierarchy in the same tree.

Please note we are using dhtmlxTree -Version: 5.0 . We are clueless as why the drag-drop is not supported/working as many of the Forums say that the Drag-Drop is supported for touch devices from version 4.1 on wards.

Appreciate any pointers/solution ASAP

Below is the code sample used for implementation.
function doOnLoad() {
myTree1 = new dhtmlXTreeObject(“treeboxbox_tree1”,“100%”,“100%”,0);
myTree1.setImagePath(firstLvlImgPath);
myTree1.setDataMode(“json”);
myTree1.enableSmartXMLParsing(true);
myTree1.enableDragAndDrop(true);
myTree1.attachEvent(“onDrag”, function(sId, tId, id, sObject, tObject){
setSourceAndTraget(sId, tId, id, sObject, tObject);
return isDroppable;
});
myTree1.attachEvent(“onDrop”, function(sId, tId, id, sObject, tObject){
updateTree(sObject, tObject);
});

myTree2 = new dhtmlXTreeObject("treeboxbox_tree2","100%","100%",0);
myTree2.setImagePath(firstLvlImgPath);
myTree2.setDataMode("json");
myTree2.enableSmartXMLParsing(true);
myTree2.enableDragAndDrop(true);
myTree2.attachEvent("onDrag", function(sId, tId, id, sObject, tObject){
	setSourceAndTraget(sId, tId, id, sObject, tObject);
	return isDroppable;
});
myTree2.attachEvent("onDrop", function(sId, tId, id, sObject, tObject){
	updateTree(sObject, tObject);
});

}


#2

Unfortunately the drag’n’drop operations in dhtmlx components are not supported on touch devices.


#3

Thank you for your valuable response. Is there any alternate way we can achieve/mock drag’n’drop operations in dhtmlx ? Or should we choose a different framework here ?

Thanks
Praveen R


#4

Unfortunately there is no solution or any workaround to implement the drag’n’drop operations in the dhtmlx on touch devices.
Also there is no planes to include such feature in the future updates.