Hi,
I have a treeview that shows folders and documents. For each folder I have the number of child folders and child documents (one level down). How can I loop through the tree and calculate the total number of sub-folders and documents for each node?
For example, this is what I have:
Root (folders: 2, docs: 0)
Folder 1 (folders: 2, docs: 1)
Folder 2 (folders: 0, docs: 0)
Folder 3 (folders: 0, docs: 1)
Document1.txt
Document2.txt
Folder 4 (folders: 0, docs: 2)
Document2.txt
Document3.txt
And this is what I need:
Root (folders: 4, docs: 4)
Folder 1 (folders: 2, docs: 2)
Folder 2 (folders: 0, docs: 0)
Folder 3 (folders: 0, docs: 1)
Folder 4 (folders: 0, docs: 2)
Thank you,
Julia
I have a treeview that shows folders and documents. For each folder I have the number of child folders and child documents (one level down). How can I loop through the tree and calculate the total number of sub-folders and documents for each node?
For example, this is what I have:
Root (folders: 2, docs: 0)
Folder 1 (folders: 2, docs: 1)
Folder 2 (folders: 0, docs: 0)
Folder 3 (folders: 0, docs: 1)
Document1.txt
Document2.txt
Folder 4 (folders: 0, docs: 2)
Document2.txt
Document3.txt
And this is what I need:
Root (folders: 4, docs: 4)
Folder 1 (folders: 2, docs: 2)
Folder 2 (folders: 0, docs: 0)
Folder 3 (folders: 0, docs: 1)
Folder 4 (folders: 0, docs: 2)
Thank you,
Julia