Thanks. That worked. But I how do I expand all the root nodes ?
e.g
ContainerA
SubContainerA
SubContainerB
ContainerB
SubContainerA
ContainerC
SubContainerA
SubContainerB
I did ExpandHierarchyItem(treelistview.Items[0]) and this expanded the first root node which is ContainerA.
I want to be able to expand the remaining root nodes as well i.e ContainerB and ContainerC.
Is there any property that tells if the node is a root node ? Number of SubContainers is not constant.