-1

I am trying to implement keno treeview...

                     @(Html.Kendo().TreeView()
    .Name("treeview-left")
    .DragAndDrop(true)
    .Items(treeview =>
    {
        treeview.Add().Text("Woods")
            .Expanded(true)
            .Items(furniture =>
            {
                furniture.Add().Text("Tables & Chairs");
                furniture.Add().Text("Sofas");
                furniture.Add().Text("Occasional Furniture");
            });
        treeview.Add().Text("Others")
           .Items(furniture =>
           {
               furniture.Add().Text("Items 2");
               furniture.Add().Text("Items 3");
               furniture.Add().Text("Items 3");
           });
        treeview.Add().Text("Decor")
            .Items(furniture =>
            {
                furniture.Add().Text("Bed Linen");
                furniture.Add().Text("Curtains & Blinds");
                furniture.Add().Text("Carpets");
            });
    })

I want to drag and drop only parent elements

These are the items only i want to drag

1) Woods

2) Others

3) Decor

Note : i dont want to drap any other child elements

I tried to stop, but it was stopping entire thing

if ($(e.sourceNode.childNode).parentsUntil(".k-treeview", ".k-item").length == 0) {
        e.preventDefault();
    }

guide me to sort the issue

Prasad Raja
  • 685
  • 1
  • 9
  • 37

1 Answers1

0

Here is an example with AngularJS, but it is the same approach

http://dojo.telerik.com/EluY/9

knikolov
  • 1,650
  • 1
  • 12
  • 18