0

I want to create a Treeview in C#. My basic data is stored in a SharePoint Online DocumentLibrary. I authenticate with a user and I want to show the folders and files as a tree view in Azure function where the user has the permissions to. On that bases the user should see the following tree.

The view should be like that:

 Folder1
      Folder11
         Document.docx
         Document.pdf
      Folder12
         Document.xslx
   Folder2
      Folder21
      Folder22
        Folder221
            Document.json
        Folder222

etc.

Maybe you can help me with this approach.

Thanks

Matthias

1 Answer 1

0

You can refer to following code to enable tree view

clientContext.Web.TreeViewEnabled = true;
clientContext.Web.Update();
clientContext.ExecuteQuery();
1
  • that's not I was looking for. I meant programmatically. I have a rootfolder of a document library and then I get recusively all the folder and file like in the example. thanks
    – Matthias
    Mar 18 at 10:45

Your Answer

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

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