拖动树视图 [英] drag n drop for treeview

查看:95
本文介绍了拖动树视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要为树视图节点拖放功能..

尝试下面的代码但没有工作:(

请帮助....





 <   script     src   =  Scripts / dist / jstree.js    type   =  text / javascript >  <   /   script  >  
< script < span class =code-attribute> src = Scripts / dist / jstree.min.js type = text / javascript > < / script >
< div < span class =code-attribute> id = jstree >
<! - < span class =code-keyword> 在此示例中,树是从内嵌HTML填充的 - >
< ul >
< li > 根节点1
< ul >
< li id = child_node_1 > 子节点1 < / li >
< li > 子节点2 < / li >
< / ul >
< / li >
< li > 根节点2 < / li >
< / ul >
< / div >

解决方案

< blockquote>应该为需要拖放的节点使用jstree-drop类。它使用dnd插件a适用于jstree。



可能对您有帮助的参考



http://jstree-sametree-dnd.blogspot.in/ [ ^ ]



http://dna.engr.latech.edu/~vsp004/lite-web/js/jstree/_docs/dnd.html# [ ^ ]

need drag n drop functionality for treeview nodes..
tried below code but not working :(
please help....


<script src="Scripts/dist/jstree.js" type="text/javascript"></script>
   <script src="Scripts/dist/jstree.min.js" type="text/javascript"></script>
<div id="jstree">
       <!-- in this example the tree is populated from inline HTML -->
       <ul>
           <li>Root node 1
               <ul>
                   <li id="child_node_1">Child node 1</li>
                   <li>Child node 2</li>
               </ul>
           </li>
           <li>Root node 2</li>
       </ul>
   </div>

解决方案

Should use "jstree-drop" class for the Nodes which needs a Drag and Drop .It uses the "dnd" plugin available for jstree .

Reference which might help you

http://jstree-sametree-dnd.blogspot.in/[^]

http://dna.engr.latech.edu/~vsp004/lite-web/js/jstree/_docs/dnd.html#[^]


这篇关于拖动树视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆