Custom Data View Web Part Using Recursion

Purpose: Provide a means to process all of the documents in a document library containing folders or containing the content type of “document set”. A document set functions very similar to a folder structure within SharePoint; and, Folders must be enabled for a document library in order to use a document set content type within it.

By default, a custom DVWP will only process the top-level content within a library or list. The top-level refers to the ‘scope’ being isolated to the folder or document set level. In order to process the content within those containers, there is a slight configuration within the DVWP SPDataSource that must be configured.

Create an .ASPX page and include a custom Data View Web Part displaying a few columns from your favorite list.

Find a line similar to the following and add the Scope=”Recursive” attribute manually:

<SharePoint:SPDataSource runat=”server” DataSourceMode=”List” SelectCommand=”&lt;View&gt;&lt;/View&gt;” UseInternalName=”True” ID=”dataformwebpart2″ Scope=”Recursive”>


This entry was posted in Data View Web Part, SharePoint Designer, Web Parts, XSL. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s