The importance of keeping the SharePoint:DelegateControl TreeViewAndDataSource in your SharePoint 2010 Master Page

Here is another gotcha when creating a custom master page. At times you might want to remove delegate controls that you are not using in a custom master page. Here is one delegate control that will make a difference if it’s not in your master page.

<SharePoint:DelegateControl runat="server" ControlId="TreeViewAndDataSource">

In the v4.master this is part of the left hand navigation code.

You can see this in action when you turn on your tree view in the navigation settings of your site.

When this control is present in your master page you can change your library view.

When the control has been removed from your page you cannot change the library view.

If you have to remove the control then add it to an ASP:Panel (visibility set to hidden) at the bottom of your master page.

Thanks for reading!

, , , , , ,