Hi,
It doesn't appear that ExpandAll triggers ItemPopulate event. All it does is to set the item's Expanded to true. The reason is for most users who use ItemPopulate, the tree is pretty huge. So it's important to call ItemPopulate only when necessary. An unconditional blanket calls to ItemPopulate defeats that purpose.
It should be quite easy for you to write some recursive code to do so. The following is ExpandAll's source code:
Code: C#
public void ExpandAll()
{
Expanded = true;
foreach (TreeNode child in SubGroup.Nodes)
child.ExpandAll();
}
You can enhance it to:
Code: C#
public void ExpandAll()
{
if (!Expanded)
{
//call your ItemPopulate event handler here
}
Expanded = true;
foreach (TreeNode child in SubGroup.Nodes)
child.ExpandAll();
}
Note this function is on the TreeNode object. So you will want to call this function on each root nodes.
Thanks