I am using Kendo UI 2005 Q2 release (v2015.2.624) with Angular JS. I have the following drop event handler to prevent an in valid drop based on the destination node type.
$scope.onDropTreeNode = function (e)
{
var destinationNode = $("#ruleTreeView").data("kendoTreeView").dataItem(e.destinationNode);
if(destinationNode.nodeType != 3)
{
console.debug("Can't drop in node type: " + destinationNode.nodeType);
e.setValid(false);
console.debug(e);
}
}
The event handler is invoked as expected, the IF statement executed, and both console.debug statements print out the debugging message/object content. I can see that the "valid" data field is set to false in the event object:
Object {originalEvent: MouseEvent, sourceNode: li#ruleTreeView_tv_active.k-item.ng-scope, destinationNode: li.k-item.ng-scope, valid: false, dropTarget: span.k-in.k-state-hover…}
HOWEVER, the Tree View control still allows the drop even though the valid == false. I was expecting the drop to be reverted after e.setValid(false).
By the way, this is running in Chrome Version 44.0.2403.130 m (64-bit).
I am facing a tight deadline, so any help is much appreciated!