This is a migrated thread and some comments may be shown as answers.

Add Nodes From A Directory

1 Answer 33 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Corey
Top achievements
Rank 1
Corey asked on 12 Mar 2012, 03:44 PM
I am trying to create a folder system for files in a directory. Any way to populate nodes without any connection with a database? Also If i give it a directory is there any way to include the folders and the files inside of those folders?

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 14 Mar 2012, 09:46 AM
Hi Corey,

You can create the TreeView programmatically from code behind, like demonstrated in the following help article:
http://www.telerik.com/help/aspnet-ajax/treeview-nodes-working-server.html 

To create the directory structure, just go through the folders and create a RadTreeNode for each one and add it to the RadTreeNode (or RadTreeView for the root) that corresponds to the parent folder.
 
All the best,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeView
Asked by
Corey
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or