I am adding list and library in treeview but it also displaying the "Forms", "Attachements", "Item" hidden folder in treeview.
Any one has any idea to hide that folder using client object model?
I'm using below code:
public static List<FolderInfo> GetFoldersInFolder(Folder folder, Web web, ClientContext clientContext) {
List<FolderInfo> result = new List<FolderInfo>();
FolderInfo folderinfo;
FolderCollection subFolders = folder.Folders;clientContext.Load(folder);
clientContext.Load<FolderCollection>(subFolders);
clientContext.ExecuteQuery();
foreach (Folder subFolder in subFolders){
folderinfo = new FolderInfo();
folderinfo.Name = subFolder.Name;
folderinfo.URL = subFolder.ServerRelativeUrl;
result.Add(folderinfo);
}
return result;
}