SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok so I need to build a visual web part (Has to be Server side and done in visual studio c#) that shows a document library. On selection of the document library, the web part must output the entire folder structure of the document library

What you guys suggest? I was thinking of using a tree view but I am struggling to figure out how to populate it. Any help would be gratefully appreciated.


share|improve this question
Exactly what are the requirements that your web part should meet? As it stands now, it's difficult to understand why you should develop a custom web part instead of using the out of the box ones. Is achieving the tree view display mode your primary need/goal? – SPArchaeologist Sep 19 '13 at 9:43

You could probably use SPGridView, its a SharePoint version of the ASP.NET GridView. You can't populate that client side, but you may populate a dummy row on the server and the use that as a template for adding additinal rows client side

or use the following link to built tree view webpart

share|improve this answer
Hey i meant server side :P... so I will take a look at it thanks. – Gerhardus Aug 8 '13 at 11:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.