Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Tree View Of Document Web part

  Asked By: Shana    Date: Aug 26    Category: Sharepoint    Views: 3320

I am making web part is for Tree view of documents
I want to following thing to display in this web part.

1) Document Folder
2) Sub document folder (if any) and so on.
3) Document (which can be any format i.e. word, text,
pdf, gif etc)
Following this should display with document
a) URL of the Document.
b) Version of the document.
c) Create Person name of the document.
I should look like
In “workspace” “Portal/Documents” Folder

- Document folder
- Sub Document folder
+ Sub of Sub Document folder
url: ……………….......
version : ………......
CreatedBy :……………….......

I have worked on this but I don’t know how to create
this hierarchical tree view of folder and sub folders

Any one have worked on this please give me any clue or
reference of document where can i get this details i
have check "site Map" web part but it not give me much



4 Answers Found

Answer #1    Answered By: Denis Cantrell     Answered On: Aug 26

Didn't someone just finish writing one and announce it?


Answer #2    Answered By: Sarita Patel     Answered On: Aug 26

I downloaded that one. Did you get it to work?

Answer #3    Answered By: Elias Cannon     Answered On: Aug 26

Are you talking about making  it look like an explorer view  where you
have the + to the side?

Answer #4    Answered By: Kartik Athani     Answered On: Aug 26

The easiest way I've found to make a tree  like structure is to write
a recursive function to build an XML Document, then use an XSLT doc
to transform the XML.

The basics behind it would be:


function BuildTree(sPath){
use the KnowledgeFolder to open sPath
for each folder  in sPath
Read in All Docs in Folder
Check for Sub Folders
if sub folder exists
BuildTree("Sub Folder Path")
end if

Obvisoulsy this is a very basic description, but if you know how to
use the document  Management Object Model, you should be able to
create this.

The XML Doc you would be creating should look something like this:
<SubFolder>SubFolder 1</SubFolder>
<SubFolder>SubFolder 2</SubFolder>

Wish I had more time to go into more details.... But I hope this
helps at least a little bit...

Didn't find what you were looking for? Find more on Tree View Of Document Web part Or get search suggestion and latest updates.