New to Kendo UI for Vue? Start a free 30-day trial
Dragging and Dropping
The drag-and-drop functionality enables the user to move the TreeView items by dragging and dropping them within a single tree or across multiple trees.
Basics
To implement dragging and dropping in the TreeView:
- Set the
draggableproperty totrue. - Handle the dispatched
dragevents.
To ease the event handling, the TreeView provides the following utilities:
- The
moveTreeViewItemfunction—A helper function which moves a TreeView item in an immutable way. - The
TreeViewDragAnalyzerclass—An API for analyzing thedragevents of the TreeView. - The
TreeViewDragCluecomponent—A component which renders a clue when an item is dragged.
Moving Items within a Single Tree
The following example demonstrates how to:
- Implement the drag-and-drop functionality within a single TreeView by using all drag-and-drop utilities.
- Update the
expandedandselecteditem fields by using theprocessTreeViewItemsfunction.
Change Theme
Theme
Loading ...
Moving Items across Multiple Trees
The following example demonstrates how to:
- Implement the drag-and-drop functionality across two TreeViews by using all drag-and-drop utilities.
- Directly update the
expandedandselecteditem fields.
Change Theme
Theme
Loading ...