3

After migrating from SharePoint 2007 to 2010 we found a few issues in the migrated document libraries, some styles were looking wierd and the biggest problem is that the "Add New Item" button is not visible at the bottom of the list view, I know that sharepoint uses LisviewWebparts in 2007 and in 2010 uses XSLTListViewWebparts, manual update is out of the question because there are a lot of document libraries and sites.

My questions is..."Is there anyway to "update" these webparts using Sharepoint Manegement Shell or any other method?"

Thanks!

1
  • Sharepoint Designer aka SPDesigner does exist Commented Oct 29, 2011 at 13:09

1 Answer 1

2

For the list view form, deleting and recreating the views worked for me:

private static void RebuildView(SPList list, SPView view)
{
    list.Views.Delete(view.ID);
    list.Update();
    string title = view.Title;
    SPView cloneView = view.Clone(
        title.Replace(" ", string.Empty), 
        view.RowLimit, 
        view.Paged, 
        view.DefaultView);
    cloneView.Title = title;
    cloneView.Update();
}

I also came across the following regarding changing web parts on other pages:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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