I need to enable drag&drop to drop items into a Trash image.
I try on error with
tT=document.getElementById(‘treeT’);
tA.dragger.addDragLanding(tT, new s_control);
and
tA.makeDragable(tT);
but when I drop an item, I can work with the item but this is not moved.
this._drag=function(sourceHtmlObject,dhtmlObject,targetHtmlObject){
targetHtmlObject.alt= 'Last item deleted: ’ + sourceHtmlObject.parentObject.label
return true;
}
Any suggerence?
Kind Regards
�lex Corretg�
When you perform d-n-d on custom HTML container, component doesn’t know how to process it correctly, so all related events will be called but without any automatic changes in tree structure.
In your case, if you need to have “delete” functionality it may be coded similar to next
this._drag=function(sourceHtmlObject,dhtmlObject,targetHtmlObject){
targetHtmlObject.alt= 'Last item deleted: ’ + sourceHtmlObject.parentObject.label
sourceHtmlObject.parentObject.treeNod.deleteItem(sourceHtmlObject.parentObject.id); // tree.deleteItem(id);
return true;
}