Questions tagged [jquery-dynatree]

Dynatree is a JavaScript tree view plugin for jQuery with support for persistence, keyboard, multiple selection, drag and drop, and dynamic Ajax loading.

Dynatree is a JavaScript tree view plugin for jQuery with support for persistence, keyboard, multiple selection, drag and drop, and dynamic Ajax loading.

Main features

  • Optimized for large dynamic trees (DOM elements are only created when really needed).
  • Programmable through a rich object oriented interface.
  • Support for lazy loading and Ajax.
  • Checkboxes and hierarchical selection
  • Supports drag and drop.
  • Support for persistence.
  • Keyboard aware.
  • Initializes from HTML code, JSON, or JavaScript objects.

Quick start

  • Include jQuery and dynatree libraries.
  • Add a element where the tree should appear.
  • Initialize the dynatree object when the page is loaded.

LINKS

104 questions
2
votes
1 answer

fancytree problems - "Uncaught Error: Assertion failed: expected array of children"

I'm trying to migrate from dynatree to fancytree. Even if I try returning the simplest json array from my webmethod I get the error in the subject title: "Uncaught Error: Assertion failed: expected array of children" The json returned as shown in…
TheMook
  • 1,471
  • 4
  • 19
  • 56
2
votes
1 answer

expanding keypath with lazyloading

I have a full tree with multiple items and multiple levels, the tree is build with an ajax call and uses lazy nodes So now i want to add the function so my tree can load and select and item if i give the full path, but before i can select the item i…
acrobat
  • 2,009
  • 2
  • 25
  • 35
2
votes
0 answers

How to delete and add nodes to/from Dynatree prog

how to delete and add nodes to/from Dynatree without disturbing other node? I have a Dynatree with check box And a user can add / remove nodes from a list of nodes in a pop up. While updating the data should be added / remove with out disturbing the…
2
votes
4 answers

How to use jQuery to select text inside anchor tags

I want to select the a tag and display its text when clicked. In another word, when I click the first link - "One", I want to display its text "One" using alert. When I click the second link - "Example", I want to display the text "Example" using…
Viswa
  • 3,201
  • 5
  • 31
  • 64
2
votes
1 answer

How to load grand children in lazy loading of dynatree?

I have requirement where some times I would like to load children as well as grand children and if possible their children in lazy loading..Is it possible? When I am preparing json response for lazy loading can I prepare json response like this? [ {…
Rajesh
  • 2,692
  • 8
  • 39
  • 67
1
vote
3 answers

drag and drop from/to dynatree

I'm trying to drag data from a dynatree and drop it to another dynatree. In the documentation an example shows how to move a node in the same tree. Is it possible to move a node and put it in the second dynaTree with all it's option?? first tree…
HRI
  • 91
  • 4
  • 13
1
vote
2 answers

can't use addChild method

I'm using the dynatree plugin for the first time, and I'm trying to add nodes dynamically. My code is below: function DrawTree() { var names = GetChildName(); var rootNode = $("#ProcessRoleTree").dynatree("getRoot"); var childNode =…
HRI
  • 91
  • 4
  • 13
1
vote
1 answer

Knockout js & Dynatree

Is there any way I can use knockout js in Dynatree ? If anyone has implemented please do let me know Thanks, Anirban
Anirban
  • 589
  • 3
  • 14
  • 40
1
vote
0 answers

Virtual Pagination on Dynatree

I am trying to use virtual paging on the dynatree. I have lot of nodes & sub-nodes which are loaded on an on-demand basis. But the requirement is even on the on-demand loading, virtual pagination should trigger. i.e. when the user scrolls down mode…
Anirban
  • 589
  • 3
  • 14
  • 40
1
vote
2 answers

Dynatree: Prevent parent nodes from being selected by default, using select mode 3 (hierarchical)

I am using Dynatree with select mode "3", which enables a hierarchical selection mode. When my tree renders, all nodes that have children render as selected by default. Leaf nodes render unselected by default. If I start manually selecting nodes,…
Seth Petry-Johnson
  • 11,227
  • 6
  • 44
  • 68
1
vote
3 answers

DynaTree root node null / undefined - children undefined

("#tree").dynatree({ minExpandLevel: 1, //persist: true, children: [{"title":"First Location", "isFolder":true, "expand":true, "key":"location.92", "icon":"location.gif", "children":[{"title":"
Earls
  • 83
  • 1
  • 8
1
vote
0 answers

Multiple Drag and Drop in dynatree

In Dynatree, Drag and drop functionality is enabled by defining the appropriate callbacks: $("#tree").dynatree({ [...] dnd: { onDragStart: function(node) { /** This function MUST be defined to enable…
1
vote
1 answer

sort all nodes in dynatree in alphabetical order

How do i sort all sub subsequent child node in jquery dynatree http://wwwendt.de/tech/dynatree/index.html ? Using this line $("#categoryTree").dynatree("getRoot").sortChildren(compare, false); i am able to sort first level nodes but elements inside…
Shaggy
  • 4,043
  • 22
  • 84
  • 144
1
vote
1 answer

Dynatree toDict()

In the http://wwwendt.de/tech/dynatree/index.html it says toDict() Convert the tree into a JavaScript object. See node.toDict() for details. Is there a way to initialize the tree from that object later? Thanks.
sarsnake
  • 23,178
  • 58
  • 166
  • 281
1
vote
0 answers

passing values from dynatree to JSON

i am creating one dynatree structure and trying to convert nodes of tree to JSON value. How to do it? i am able to get a JSON objects but not able to get a values to that JSON object. Following is the code to create dynatree and converting it to…