Hello friends, I'm using the control Ultratree to show my data into two levels (Father and Child), My tree have this structure:
Father: IdCategory ---- Category Description
Child: IdCategory ---- IdProduct ---- Product Description
IdCategory and IdProduct are hide, now, I've implemented the method Click from Ultratree and I use the IdCategory in my event,
Please, how to obtain the IdProduct (Child Nodes), by default the Control Ultratree only show the CategoryId.
Any idea. Thanks fro all.
Regards.
Hi,
To get the child nodes of any node in the tree, you simply use the Nodes property of that node.So if you have a parent node, you could loop through the child nodes like this:
foreach (UltraTreeNode childNode in parentNode.Nodes)
{
Debug.Writeline(childNode.Text);
}
Hi, thanks for replyng, please how to obtain the IdProduct when I make click in the Node Child.
You access the cells collection. Presumably, you are already doing the same thing to access the data in the parent node.
Debug.Writeline(childNode,Cells["IdProduct ].Value);
Hi, thanks for all, You have saved my life. This miy code:
IdProduct = utvGerencia.ActiveNode.Cells(
"Id_Product").Value
Good Bye.
Regards,