Questions tagged [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

246 questions
1
vote
1 answer

Deselect a Selected Node in Dynatree

I am trying to deselect the single selected node in dynatree on a button click. Here is my code : $(function() { $('#btnViewAll').on('click', function(e) { $('#contents>div').show(); …
nlstack01
  • 789
  • 2
  • 7
  • 30
1
vote
1 answer

Sorting whole fancytree by title fails

I have a js code at my page that gets JSON-hierarchy from server with separate load and builds a visual Fancytree hierarchy at page (i left html page parts out from example). $(function() { $("#tree").fancytree({ source: { url:…
Juha Tuomala
  • 111
  • 11
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
  • 26,667
  • 58
  • 180
  • 286
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…
1
vote
2 answers

From a list of files, dynamically create array of hashes for dynatree

I have a list of files sorted in an array, like: arr = ["./a.txt", "./b.txt", "./bar/z.php", "./foo/hello/y.php", "./foo/x.php"] How to create a dynatree object out of this? A dynatree object for it, should look like: [{"name"=>".", "title" => ".",…
shivam
  • 16,048
  • 3
  • 56
  • 71
1
vote
2 answers

How to remove Addclass node data in Dynatree

I have a node relation with data of MySQL, inside this data have Visible field. When i take visible by default the node of dynatree is view in black, when uncheck visible view in gray. I use this to set to gray:…
1
vote
1 answer

dynatree - Updating node Display Order on node drag n drop

I am just starting to use Dynatree and stuck while updating the node display order to database while DragnDrop nodes to and fro. I tried to google a bit and could not find any helpful links. So, it will be greatly appreciated of any one can help or…
10K35H 5H4KY4
  • 1,496
  • 5
  • 19
  • 41
1
vote
2 answers

Jquery Dynatree plugin - how to get children of a given node

I looked through documentation and there seems to be no way to get an array of children of a given node... something like if (parentNode.hasChildren() == true) { alert('yay'); if (parentNode.children == null) { …
sarsnake
  • 26,667
  • 58
  • 180
  • 286
1
vote
2 answers

Dynatree slow when dynamically loaded with 100+ nodes

How do I speed it up? I get the results from JSON web service (lightning fast). Adding nodes to the tree using something like parentNode.addChild({ key: key, title: value, addClass: cssClass }); Unfortunately, a tree…
sarsnake
  • 26,667
  • 58
  • 180
  • 286
1
vote
3 answers

Change the Json Format dynamically

My JSON returns something like this { data: "Business & Investing (0)", attr: { id: "91", rel: "file", dataitem: null, datatext: null }, children: [ ] }, { data: "Stock Exchange & Money (0)", …
Vivekh
  • 4,141
  • 11
  • 57
  • 102
1
vote
0 answers

Tree View Using dynatree

Hai I am facing this little problem in using dynatree with ajax call in MVC, as the tree is not showing up its just showing null,null,null as tree My Method (json) in Controller [HttpGet] public JsonResult Catalog(string filter) { …
Vivekh
  • 4,141
  • 11
  • 57
  • 102
1
vote
1 answer

WCF post data converting to raw html instead of Json format

Very new to WCF and almost got everything working except the post from JQuery to WCF. The Jquery is processing a DynaTree and post the data the WCF service. So far so good. When I debug, I find that the posted data accepted as Stream inside the WCF…
Ikram M.
  • 347
  • 4
  • 16
1
vote
1 answer

Dynatree Deselect node (or Remove active class) when clicking on a link

I'm trying to deselect the current node in a dynatree. node.deactivate(); // doesn't work node.focus(false); // doesn't exist I tried to remove the classes that highlight the focused/activated node : This worked but destroy the complete CSS of the…
Stéphane V
  • 1,094
  • 2
  • 11
  • 25
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
  • 898
  • 2
  • 14
  • 33
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
  • 1,068
  • 5
  • 18
  • 31