This is a migrated thread and some comments may be shown as answers.

Invalidate during drag?

0 Answers 42 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Kyle
Top achievements
Rank 1
Kyle asked on 24 May 2012, 06:52 PM
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?

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Kyle
Top achievements
Rank 1
Share this question
or