Look I can give u the idea here, but can't code it for you, there can be two simple possible ways that I know:
1. Create an XML with distinction of Folders and files like
<RootDirectroy>
<FolderName>
<FileName></FileName>
</FolderName>
<FolderName>
<FileName></FileName>
</FolderName>
</RootDirectory>
Now bind this as datasource to the Treeview control.
2. For each directories and files, create treenodes for directories first, and the treenodes for files under it. finally add the parent directory to the main RootDirectory node.
Try any of the above, I hope you will be able to get through.
Regards
Mike
Don't expect too much, too soon.
|