Tag Archives: ListTitleViewSelectorMenu

SharePoint 2010 – Lost View Breadcrumb with Multiple Webparts on List View Pages

Have you ever tried to add a Content Editor web part to a 2010 list view say with instructions for the list only to find that you lose the Views dropdown in the breadcrumb?

We had such views on many lists in our MOSS environment only to run into this loss of functionality when we ran through the upgrade. I’ve scoured the internet and picked apart the views to figure out a workarounds.

The first thing I came across was this article/product by Pentalogic:

http://blog.pentalogic.net/2011/03/disappearing-view-selector-menu-sharepoint-2010/#more-1997

This got me started on the way to finding a good solution to the problem. I’ll admit that I spent quite some time playing with reflecting the ListTitleViewSelectorMenu as described to alter the Visible field/property. I was largely unsuccessful as I really didn’t want to put the time into something that could break with an update or service pack. I was about to give up when I read that the ListTitleViewSelectorMenu really uses the ListViewSelectorMenu for the actual rendering.

Instead of reflecting the sealed private property, why not cut to the chase and just add in a second non-hidden ListViewSelectorMenu? Sprinkle in some generic controls for the separator and styling, a touch of logic to ignore the case where there is only one web part and success we have our drop-down back.

I largely want to credit the Pentalogic folks for leading me heavily down the right path but I did want to share a method of getting around this without using reflection. Its not the cleanest as you’ll have two of the same basic control on the page with one hidden, but its more future proof.