Hi,
I'm using UltraTree component from NetAdvantage for Windows Forms
I have an UltraTree with the following properties
ultraWinTree.ViewStyle = Infragistics.Win.UltraWinTree.ViewStyle.OutlookExpress;
The tree is populated with 3 nodes levels and each node has child nodes.
My requirement is, when i found expand status in my lowest child node i need to expand all parent nodes of that child node.
What iam trying to do is :
private static void ExpandNodes(UltraTreeNode node) { if (node.Parent == null) return; node.Parent.Expanded = true; CellExpand(node.Parent); }
private
static void ExpandNodes(UltraTreeNode node) {
if (node.Parent == null)
return; node.Parent.Expanded =
node.Parent.Expanded =
true; CellExpand(node.Parent); }
CellExpand(node.Parent); }
I am able to expand the immediate parent node, but the node.parent of the parent node is null, Is there any solution? please help me, Regards Sami.
I am able to expand the immediate parent node, but the node.parent of the parent node is null,
Is there any solution? please help me,
Regards
Sami.
Hi Sami,
What is the "CellExpand" method doing? I'm guessing this is just a type and you meant to call "ExpandNodes" recursively.
If the parent node is null, then my best guess is that this code is getting called for a Level 1 node that only has a single parent. There is no other explanation I can think of.