Thursday, August 4, 2011

Reset ContentType Order in SharePoint 2010

//This is for Root Folder
   list.RootFolder.UniqueContentTypeOrder = null;
   list.RootFolder.Update();


//This is for Sub Folders
  SPFolderCollection folderCol = oList.RootFolder.SubFolders;
foreach (SPFolder folder in folderCol)
{
  folder.UniqueContentTypeOrder = null;
  folder.Update();
}

No comments:

Post a Comment

Followers

Blog Archive