How to reorder by Drag Drop in Kendo UI TreeList?

1.1k Views Asked by At
     var treeDataSource = new kendo.data.TreeListDataSource({
    data: [
        { id: 1, Name: "Main Menu", Icon: "", View: "", parentId: null },
        { id: 5, Name: "Sub Menu 1", Icon: "", View: "", parentId: 1 },
        { id: 6, Name: "Sub Menu 2", Icon: "", View: "", parentId: 1 },
        { id: 7, Name: "Sub Menu 3", Icon: "", View: "", parentId: 1 },
    ],
    schema: {
        model: {
            id: "id",
            expanded: true
        }
    }
});

$scope.TreeViewOptions = {
    dataSource: treeDataSource,
    height: 540,
    editable: {
        move: true
    },
    sortable: true,
    columns: [
         { field: "Name" },
        { field: "Icon" },
        { field: "View" }
    ]
};

Every thing is working fine, but I am unable to get column ordering working. Essentially what I need is to be able to drag drop the rows to set their display order.eg i want to drag before and drag after functionality in the treeList like in treeView. in this example i want to drag Sub Menu 3 to the Sub Menu1 position an Vice Versa

This feature exists in Kendo UI TreeView widget. Is this feature supported in the Kendo UI Tree List Widget? If not, then is there a workaround to get it working?

0

There are 0 best solutions below