Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Add custom drop event to TreeView node to handle drops from File Explorer

$
0
0

Now the problem is that I seem to have no way to match the target node of the drop to its data source in the drop handler:

 

$(allNodes[i]).bind('drop', function (e)
    {
        $(this).css({ 'box-shadow': 'none', 'border': 'none' });
        if (e.dataTransfer)
        {
            var files = e.dataTransfer.files;
           // How do I match the e.target back to the data?
            alert('dropped on item outer');
        }
        return false;
    });

 

The div element in e.target contains no uid.  I could dig through the spans to grab the node name but that wouldn't work if there were two nodes of the same name in different branches.  I keep seeing code like this:  var treeView = $("#treeView").data("kendoTreeView"); on forum posts but that always returns null when binding to a view model.  Any way I can make this work?

 


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>