Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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!

share|improve this question
    
Sharepoint Designer aka SPDesigner does exist –  Sunil Singhal Oct 29 '11 at 13:09
add comment

1 Answer

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:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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