After doing an upgrade on a 2007 content database, I have noticed that every existing list view web part (not new, they dont seem to be affected) has a checkbox for selecting multiple items.

I can write a script to go through and change all views associated with the list no problem. My problem is the "current view" of the list view web parts. I noticed that when I changed all of the views in a list to get rid of the checkbox, the "current view" on the list view webpart retained the check box.

Is there a way to change all of the "current views" of list view web parts? Or am I resigned to manually changing them?


I don't think John's suggestion will do the trick for existing list views. When you change the underlying views at the list level the "current view" does not automatically update on the web parts already in existence.

I'd try one of two things depending on how many list views you have and your client's needs. If it's a small number, change each web part to a different view, then back to the one you intend. This will "jar" the web part to consume the updated view. If you have too many web parts to do this, you'd have to write code to get a handle on every web part for every list(using SPLimitedWebPartManager) and set the TabularView property to false.

Oftentimes these upgrade issues are minor annoyances and not worth the considerable effort needed to remedy them. If a great deal of manual effort is involved in the solution you might want to suggest making the changes only on the most highly used or high-profile places, where the ROI is highest.

| improve this answer | |
  • There are too many list views to change for this to be not a long job. We will probably make a set of manual steps for site owners to follow to fix this. I like the idea of changing the views and causing the list views to reconsume them though. – John S May 3 '12 at 19:33
  • I agree with that conclusion. Writing out manual steps for site owners to implement(or not) is a good approach. – Derek Gusoff May 4 '12 at 23:28

You could do this with the C# object model in a custom solution. In this example they turn it on: http://social.technet.microsoft.com/Forums/en-CA/sharepoint2010programming/thread/94b8ff6e-2676-45f6-b38f-27aad117a532

Just do the opposite.

| improve this answer | |
  • Are the current views stored in the list object in the spweb? – John S May 2 '12 at 22:09
  • Yes, you should be able to do a foreach(SPView view in list.Views) msdn.microsoft.com/en-us/library/… – John Chapman May 2 '12 at 22:13
  • I converted that to powershell and am getting an exception. The error message is "The file is not checked out. You must first check out this document before making changes." – John S May 3 '12 at 18:52
  • This is due to the pages on the subwebs requiring a check out before editing. Looks like my idea of scripting this manual step is bunk. Thanks though. – John S May 3 '12 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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