Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Kendo UI Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
Kendo UI Cookbook

Kendo UI Cookbook

By : Ganatra
2.8 (4)
close
close
Kendo UI Cookbook

Kendo UI Cookbook

2.8 (4)
By: Ganatra

Overview of this book

This book is an easy-to-follow guide full of hands-on examples that allows you to learn and build visually compelling web applications using the Kendo UI library. This book will do wonders for web developers having knowledge of HTML and Javascript and want to polish their skills in building applications using the Kendo UI library.
Table of Contents (18 chapters)
close
close
Kendo UI Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1
Index

Using the drag and drop feature to move elements in TreeView


In a TreeView widget, elements in the tree can be dragged-and-dropped to various levels. This is applicable not only to child elements, but also to top-level nodes in the tree.

How to do it…

To enable the drag and drop feature, specify the dragAndDrop property as true while initializing the TreeView widget, as shown in the following code snippet:

$('#treeView').kendoTreeView({
  dragAndDrop: true,
  
  dataSource: [{
    text: "Directory1",
    items: [ 
      { text: "File1.txt"}, 
      { text: "File2.txt"}
    ],
    expanded: true
  }, {
    text: "Directory2",
    items: [ 
      { text: "File3.txt"}, 
      { text: "File4.txt"}
      ]
    }, {
    text: "Directory3",
    items: [ 
      { text: "File5.txt"}, 
      { text: "File6.txt"}
      ]
    }
  ]

});

Here, when the dragAndDrop property is set to true, the elements in TreeView can be moved between various levels in the tree.

As the user drags the node, various events are...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Kendo UI Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon