当前位置:编程学习 > JS >>

asp.net mvc + ExtJs 实现无限级TreePanel 加载、添加、编辑、删除

以前用过Ext.tree.TreePanel 做过树形结构的查询绑定,感觉TreePanel还蛮好。

今天来尝试下 结合Ext.menu.Menu 菜单做一个增删改的功能,并实现无限级的绑定,如下图的效果:

第一步:TreePanel的无限级加载设计:

我的数据设计结构如下图:

第二步:后台获取级联数据结构,返回json数据类型:

[{"id":7,"text":"2011","leaf":false,"expanded":true,"children":
[{"id":8,"text":"春季","leaf":false,"expanded":true,"children":
[{"id":21,"text":"五月","leaf":false,"expanded":true,"children":
[{"id":26,"text":"第四周","leaf":false,"expanded":true,"children":
[{"id":28,"text":"星期五","leaf":true,"expanded":false,"children":
[]},{"id":27,"text":"星期四","leaf":true,"expanded":false,
"children":[]},{"id":
补充:Web开发 , ASP.Net ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,