Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Create a Tree Structure from scratch...

$
0
0

I must create a tree structure from scratch on my MVC VIEW page.   This is for a folder tree within my web page.  What I need to know is how to create a dynamic table that indents based on the data level - I will need a table that print out as shown in the example based on the Level. Bind Data in a Tree List is the final goal. 

How do I create a for loop or some type of loop that will allow me to loop through my data-set and structure the content as presented below?

Example:

TreeLevelType (Folder or File)
My Documents Level 0Folder
     Saved By The Bell.docxLevel 1File
     Hank ShizzoeLevel 1Folder
     Lord of the FilesLevel 1Folder
           Folder 103      Level 2Folder
           Folder 104Level 2Folder
                Count_Excel.xlsLevel 3File
New HistoryLevel 0Folder
Favorite AuthorsLevel 0Folder
     John Steinbeck Level 1Folder
           Essay 1.docLevel 2File
           Essay 2.docLevel 2File

 Your expertise is greatly appreciated.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>