Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by heiko3169 on Jul 29, 2008 14:36
open dhtmlx forum
Custom Drag Out with MultipleSelect tree (with multiple items)

I wonder whether its possible to use the custom drag out as described here:
http://www.dhtmlx.com/docs/products/dhtmlxTree/samples/drag_n_drop/pro_drag_out.html
with multiple nodes from a tree (MultipleSelect enabled)

When I try that, I always get the first item only?!

Thanks in advance
Heiko
Answer posted by Support on Jul 30, 2008 02:39
The solution proposed at pro_drag_out.html works with single item only, it need to be modified to work with multiple items.

function s_control(){   
    this._drag=function(sourceHtmlObject,dhtmlObject,targetHtmlObject){
        targetHtmlObject.style.backgroundColor="";
        var tree=sourceHtmlObject.parentObject.treeNod;
        var d = tree._dragged;
        for (var i=0; i<d.length; i++)
          targetHtmlObject.value+=tree.getItemText(d[i].id);
    }