Hi,
when i am setting drag text dynamically using rowToDragElement API in Treegrid, it throws below js error message but Dynamic Drag text was displayed correctly. Please advice to avoid js error msg being displayed
JS Error Message:
Message: ‘window.dhtmlDragAndDrop.dragNode.firstChild.rows.0’ is null or not an object
Line: 7
Char: 364
Code: 0
URI: http:// localhost:8080/bb_dev1/view/js/grid/dhtmlx_extdrag.js
Code used:
grid.rowToDragElement=function(id){
//any custom logic here
var count=0;
var selectedId = grid.getSelectedRowId();
if(selectedId!=null){
if(selectedId.indexOf(",") > -1)
{
var arr=selectedId.split(",");
count=arr.length;
}
else
count=1;
}
var text = count + " item(s) moving!!";
return text;
}
Unfortunately your issue cannot be reproduced locally.
Your code works well for us.
If issue still occurs for you, please, provide with a complete demo or a demo link, where the issue can be reconstructed locally.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/auxiliary_docs__ … pport.html
Hi sematik,
Please find attached demo zip file. for your information, we had modified dhtmlxgrid js for multiselection by single-click . Please suggest for the solution, Thank you
steps to recreate:
1)open index.html in browser
2) select row no 2 and 3 by single click / ctrl click
3) drag the selected rows
upd: demo has been removed, as it contains the js files from the PRO version of dhtmlx
In case of customizing the the drag overlook behavior using the methods or events, please, try not to use the dhtmlx_extdrag.js as it creates it’s own customization, which may conflict with your custom.