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?