I would like to validate drag/drop as the user moves a node over other tree nodes.
I have the following source:
$("#treeView").kendoTreeView({
dragAndDrop: true,
.......
}).bind("drag", function(e) {
var node = $(e.dropTarget).closest(".k-item");
// Only care if we are dragging to a treeviewitem
if (!(node.length && node.parents(".k-treeview").length)) return;
var targetId = $(node).find('.data-id').val();
if(targetId != 'Testing")
// TODO: Mark dragging as invalid?
});
But i'm not show how to mark the drag as invalid? Am I going about this the correct way?
I have the following source:
$("#treeView").kendoTreeView({
dragAndDrop: true,
.......
}).bind("drag", function(e) {
var node = $(e.dropTarget).closest(".k-item");
// Only care if we are dragging to a treeviewitem
if (!(node.length && node.parents(".k-treeview").length)) return;
var targetId = $(node).find('.data-id').val();
if(targetId != 'Testing")
// TODO: Mark dragging as invalid?
});
But i'm not show how to mark the drag as invalid? Am I going about this the correct way?