New to Kendo UI for jQuery? Download free 30-day trial

Expand TreeView Nodes while Dragging


Product Progress® Kendo UI® TreeView for jQuery
Operating System Windows 10 64bit
Visual Studio Version Visual Studio 2017
Preferred Language JavaScript


How can I expand the items that are hovered when the user drags a node in the Kendo UI for jQuery TreeView?


The following example demonstrates how to achieve the desired scenario.

    <div id="treeview"></div>

        dragAndDrop: true,
        dataSource: [
          { text: "foo", items: [
            { text: "bar" },
            { text: "baz" }
          ] },
          { text: "qux", items: [
            { text: "cat" },
            { text: "dog" }
          ] }

        drag: function(e) {
            var dataItem = this.dataItem(e.dropTarget);
            if (dataItem) {
                dataItem.set("expanded", true);

See Also

In this article