参考文档:

https://www.cnblogs.com/luozhihao/p/4679050.html

http://jsfiddle.net/vakata/2kwkh2uL/5/

核心的关键点是:

组装节点的children元素时,设置  children = true

 $('#jstree_company').jstree({
"core": {
"animation": 0,
"check_callback": true,
"themes": { "stripes": true },
'data': {
'url': function (node) {
return '/IS/CDictionary/GetDictionTree';
},
'data': function (node) {
return { 'id': node.id,'type':'company' };
}
}
},
"plugins": ["contextmenu", "dnd"],
});

组装的后台代码:

 JSTree treeFlow = new JSTree()
{
id = item.DictID.ToString(),
parent = id,
text = item.Title,
state = new NodeState() { opened = false },
children = true
};
trees.Add(treeFlow);

  

最新文章

  1. java打包文件夹为zip文件
  2. Python:迭代器
  3. Tortoise SVN 更换用户
  4. linux xargs 使用
  5. Ubuntu里字符编码设置
  6. error C2664: “UINT GetDriveTypeW(LPCWSTR)”: 无法将参数 1 从“char [5]”转换为“LPCWSTR”
  7. Example001使用window对象打开窗口
  8. vue入坑总结
  9. js中的typeof和instanceof和===
  10. android 小项目------黑名单app
  11. H5 基于Web Storage 的客户端留言板
  12. 在阿里云开源镜像站中下载centOS7
  13. 【转】HTTP
  14. 账户和联系人 Accounts and Contacts 译
  15. Hbase记录-ZooKeeper API
  16. 第二阶段——个人工作总结DAY01
  17. .Net 垃圾回收和大对象处理 内存碎片整理
  18. sqlserver2008debug存储过程
  19. spring冲刺第八天
  20. 你知道吗?10个精妙的 Java 编码最佳实践

热门文章

  1. sql 查询某个条件多条数据中最新的一条数据或最老的一条数据
  2. echarts笔记
  3. idea2017.2.2注册
  4. Python中所有的关键字
  5. 2018-2019-2 20165325 《网络对抗技术》 Exp5:MSF基础应用
  6. 编写MyCP.java 实现类似Linux下cp XXX1 XXX2的功能
  7. tar解压指定文件
  8. jmeter知识总结(一)
  9. [Linux]出错处理errno
  10. 浅谈《Linux就该这么学》