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
1
vote
1 answer

How can I set focus on an input field in dynatree title

I use Dynatree to get a tree view and now I want to set the focus on an input field in the dynatree title element but the element loses the focus. Unfortunately my code doesn't work. You can see it in a fiddle (http://jsfiddle.net/3nD7X/1/). When…
Patrick Vogt
  • 738
  • 2
  • 13
  • 29
1
vote
0 answers

Dynatree init from custom json data

There is an example on the website on how to construct child nodes from custom data: $("#tree").dynatree({ […] onLazyRead: function(node){ $.ajax({ url: […], success: function(data, textStatus){ …
Robert Cardona
  • 938
  • 5
  • 16
  • 30
1
vote
1 answer

Add a class to a parent node

I'm using dynatree with selectMode = 3, when user clicks into a node that has a parent, I need to apply a class to the parent. Any idea how to do it? This is my code: function CheckUnCheckParents(flag, node) { var pnode =…
rgx71
  • 807
  • 4
  • 19
  • 28
1
vote
1 answer

Make only some Dynatree nodes droppable

I have a tree with regular nodes and also some nodes that have Class1 added to them: addClass: "custom1" How can I prevent dropping on custom1 nodes and allow dropping on all other (regular) nodes?
user1480192
  • 603
  • 6
  • 21
1
vote
2 answers

Reloading dynatree with new data - destroy method or reloadChildren do not seem to work

I'm not able to reload dynatree after I received response for AJAX request. I've a pulldown 'plan.viewType' in code below. I'm invoking a JS function upon a new value selected in this pulldown which will in turn call an AJAX function.
s.r
  • 2,227
  • 3
  • 18
  • 25
1
vote
1 answer

Filtering nodes in dynatree

I've just got to grips with dynatree, custom styles and ajax calls to populate the tree. All works brilliantly. However I then needed to add a filtering capability to the nodes, just like…
TheMook
  • 1,471
  • 4
  • 19
  • 56
1
vote
2 answers

jQuery Dynatree, select a child node by title?

I'm using some code to programmatically select a root node (the only one in it) of a dynatree, i.e. $("#divDynaTree").dynatree("getRoot").visit(function (node) { node.select(true); }); I have a second dynatree with multiple…
M.Bush
  • 972
  • 1
  • 11
  • 22
1
vote
1 answer

What are the parameters to the dynatree onClick callback function?

I am looking at the dynatree documentation, and it shows that the onClick callback function is passed two parameters: node & event. What exactly are these parameters? I would assume that the "node" parameter is of type DynaTreeNode. What I am…
John S
  • 20,117
  • 7
  • 39
  • 52
1
vote
1 answer

undo drag and drop of item

I have a full functional dynatree, where data gets load via ajax (database source), now i enabled drag and drop functionality for the tree. When an item gets dropped i do an ajax request to update the database so node data gets updated. But i do…
acrobat
  • 2,009
  • 2
  • 25
  • 35
1
vote
1 answer

jQuery Dynatree with 1000 checkbox is very slow

I am loading more than 1000 nodes(including subnodes) into a dynatree and using a check box for each node to select. But if we select all or deselect all like in a demo, http://wwwendt.de/tech/dynatree/doc/sample-select.html , it is very slow and…
Murali Murugesan
  • 21,303
  • 16
  • 65
  • 114
1
vote
1 answer

How to refresh a jquery dynatree without rerendering it completely again?

In my webapp I am using dynatree to display a tree of data which can be edited using drag&drop (for hierarchy changes) and through custom links (to change the status of an item). Every change is saved into the database directly after dropping or…
peterp
  • 3,011
  • 3
  • 20
  • 35
1
vote
1 answer

Dynatree with real checkbox

I wanted to have a checkbox tree form and I used dynatree jquery tree to do that. Then I found out dynatree doesn't use real checkboxes so I placed html checkbox inside the tree. Its working fine until I realise when the node is expanded/collapsed…
user648198
  • 1,904
  • 4
  • 18
  • 26
1
vote
0 answers

How to parse Dynatree JSON variable?

I am using Dynatree plugin in play 2.0 (Java). They specified var dict = $("#tree").dynatree("getTree").toDict(); to save whole tree into single variable in form of JSON Object. I am converting it to string by using JSON.stringify(dict); and I am…
DSKVP
  • 623
  • 1
  • 11
  • 19
1
vote
1 answer

List checked nodes in Dynatree

I have tree created with Dynatree, with checkboxes in it. Can you help me how can I get a list (or array) of checked checkboxes in it, so I can manipulate with them (move them into another tree)? Tnx in adv!
user198003
  • 10,571
  • 27
  • 90
  • 146
1
vote
1 answer

Dynatree maximum levels

Is it possible to define maximum level of nodes in Dynatree? Or, how to define maximum depth of nodes in a tree? Tnx in advance!
user198003
  • 10,571
  • 27
  • 90
  • 146