简体   繁体   中英

Treeview structure in asp.net mvc with jQuery

I need to create a treeview structure using jQuery in asp.net mvc applicatiopn.

Let me describe my scenario: I have two tables - Document Template and Instructions Document template has different documents and instructions under these documents are there in Instructions table.

The DocumentTemplate table looks like 在此处输入图片说明

The Instructions table has DocId as foreign key and it looks like: 在此处输入图片说明

I want the tree with structure

TestDoc1 TestDoc1Instn1 TestDoc1Instn1.1 TestDoc2 TestDoc2Instn1 TestDoc2Instn2.1 TestDoc2Instn2.1.1 TestDoc2Instn2.2 TestDoc2Instn2.2.1 TestDoc2Instn2.2.2 TestDoc3 TestDoc3Instn1 TestDoc4 TestDoc4Instn1

Can any help me on this? Thanks for all help in prior.

我可以为您提供两种解决方案(取决于您要如何表示数据):jQuery TreeView插件( ASP.NET MVC的使用示例 )或jqGrid插件TreeGrid功能( ASP.NET MVC的使用示例

In my Mvc Controls Toolkit I have a TreeView server control. It allows also node editing, insertion of new nodes, and moving sub-tree into another location by dragging it with the mouse. All changes are reflected Automatically on data structures on the server side when the view is posted. Moreover all nodes are templated and the same tree can have different type of nodes. Give a look here: http://mvccontrolstoolkit.codeplex.com/wikipage?title=TreeView

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM