dynatree

dragging from a sortable list to a drag and drop plugin

亡梦爱人 提交于 2019-12-12 09:20:10
问题 I am trying to allow dragging from a sortable list to a dynatree. My initial though was to specify something like this: $('#ews_pgs_clpbrd_items').sortable({ connectToDynatree: true }).disableSelection(); dynatree does not register the drag and drop events for the sortable items. so I tried $("#ews_pgs_clpbrd_items").sortable().disableSelection(); $("#ews_pgs_clpbrd_items li").draggable({ connectToDynatree: true, connectToSortable: "#ews_pgs_clpbrd_items" }); This allows the items in the

Getting Div ID on Header Click, Accordion

五迷三道 提交于 2019-12-12 05:13:25
问题 I'm using Jquery accordion to populate a dynatree. I need my accordion div's to populate on click of the header, so that is why I am trying to grab div id. This Jquery works but only when I click inside the expanded div and not the header. Which makes sense because my event is .common click. $(".common").click(function () { var currentID = $(this).attr("id"); alert(currentID); }); <div id="accordion"> <h3>Project Type</h3> <div id="1" class="common" style="height:150px;"> </div> <h3

How can I force sync mode on dynatree?

て烟熏妆下的殇ゞ 提交于 2019-12-11 14:48:26
问题 I'm using Martin Wendt's Dynatree and want to update the tree in Ajax, dynamically and recursively. For this, I'm using functions like tree.getNodeByKey(nodes[i-1]).appendAjax({}); and tree.activateKey(nodes[i]); in a for loop. When adding alert("Hello world"); into the loop, my code works correctly 95% or the time. Without it, the code never works. The problem is obviously coming from the fact that Dynatree is performing its Ajax requests in asynchronous mode , and seem ignoring the async

dynatree + asp.net mvc - How do you post data back to server?

假如想象 提交于 2019-12-11 05:38:54
问题 I am using asp.net mvc 3 and looking at possibly using dynatree. I am in the research page still and trying to figure out some outstanding questions before I start actually implementing it. Dynatree with ASP.NET MVC I been looking at the above post and how @Matt Penner renders his tree view and in my opion looks cleaner than the accepted answer. One question I have though is how do you post the checked options to the server? When it gets rendered it seems to all be bullet tags that get

How can I read parent nodes with partly selected child nodes

有些话、适合烂在心里 提交于 2019-12-08 05:10:03
问题 I'm using dynaTree http://wwwendt.de/tech/dynatree/index.html in my code to show a 2 level tree. this tree is shown in selectMode = 3 with checkboxes and when user check a node checkbox, its parent turns to gray mode . in next stage when user clicks a button I'm sending all selected nodes to server to process. What I would like to do is send all gray mode check boxes as well. How can I achieve this goal? Edit: This is all the code you need <html> <head> <link type="text/css" href="../css/ui

Dynatree Expand Parents of Selected Nodes

[亡魂溺海] 提交于 2019-12-05 12:51:01
I have Dynatree running well on my page. I am using an initAjax to get the structure. When I generate my json I include "select": true where appropriate to select check-boxes. Most (all) of the check-boxes are at a depth of three levels down from the root. I would like to expand the parents of the selected nodes so the user can see the selected check-boxes when the page loads. I think I need to do something on the onPostInit function with getSelectedNodes, but I can not nail down the code?? I'm not sure if I should be using a each statement to loop through the selected nodes? Any help would be

dragging from a sortable list to a drag and drop plugin

二次信任 提交于 2019-12-04 20:33:58
I am trying to allow dragging from a sortable list to a dynatree. My initial though was to specify something like this: $('#ews_pgs_clpbrd_items').sortable({ connectToDynatree: true }).disableSelection(); dynatree does not register the drag and drop events for the sortable items. so I tried $("#ews_pgs_clpbrd_items").sortable().disableSelection(); $("#ews_pgs_clpbrd_items li").draggable({ connectToDynatree: true, connectToSortable: "#ews_pgs_clpbrd_items" }); This allows the items in the sortable list to be dragged to the dynatree but it no longer allows sorting. When I try to sort I get the

Using jQuery dynatree with Knockout and Breeze

拥有回忆 提交于 2019-12-02 16:09:52
问题 OK, following the suggestion from PW Kad I'm splitting this part of the question off from where it started on question ID 17973991. I have a viewmodel that utilises a datacontext built around breeze and it fetches the data I want and populates observable arrays. I have a requirement to use data already retrieved by Breeze to populate another (observable) array to use in a treeview. As the existing data does not have the correct fieldnames, I need to be able to create a new array with correct

Dynatree with ASP.NET MVC

谁都会走 提交于 2019-11-30 04:07:44
Has anybody got any examples of using the Dynatree plugin with MVC? I have been wrestling with it without much progress. I have an action method which returns a JsonResult (but selects all columns in the underlying table, not sure if this is the problem) and in my initajax call , all I'm doing is calling this method. If it's not too much trouble, I am looking for sample View and Controller action methods. Thanks in advance for any help Steve You need to create an object to serialize the nodes eg. public interface ITreeItem { } /// <summary> /// Tree Item Leaf. /// </summary> public class

how to reload/refresh/reinit DynaTree?

筅森魡賤 提交于 2019-11-27 13:53:09
问题 When I do the following $('#tree').dynatree("option","initAjax",{url:"http://google.com"}); I want dynatree to forget about current tree data and reload with new data from the specified url instead. But I find it does not do that by default. Thanks. 回答1: look at the tree.reload() method, it should do what you are after. see the docs here: http://wwwendt.de/tech/dynatree/doc/dynatree-doc.html#h8.2 as in the docs, the tree is the internal drawing of the tree, and you get it by calling the