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

This question already has an answer here:

I am trying to display only Document Libraries using SPTreeView control. I am providing SPHierarchyDataSourceControl with ShowDocLibChildrent = true as a datasource to spTreeView control.

But this shows all the document libraries. I want to show document libraries with specific content types only. How can filter out document libs with specific content type on SPHierarchyDataSourceControl or spTreeView?

share|improve this question

marked as duplicate by SPDoctor Feb 16 '13 at 14:24

This question was marked as an exact duplicate of an existing question.

You can create your own custom data provider for the treeview control and then use something like the additionalpagehead delegate control to instantiate it and set it as the datasource for the treeview.

Here is an example of creating a custom site map provider:

Here is an example of using the additionalpagehead control:

And all you'd need to do with the TreeView control itself is:

WebTreeView.DataSourceID = null;
WebTreeView.DataSource = yourcustomsource;
share|improve this answer

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