Hi,
I want to get the child node index in a Tree.
For E.g.Elements in a tree are displayed as shown Below
-ParentNode1
-ChildNode1
-ChildNode2
|
|
|
-ChildnodeN
I want to get the index of childNode1.How can I get it using descriptive programming?
Pls respond ASAP.
Thanks,
Rakesh
Index of ChildNode in a Tree
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Index of ChildNode in a Tree
Hi,
If the index attribute is set to a value you can get it with the following method:
Markus
If the index attribute is set to a value you can get it with the following method:
String index = childNode1.Element.GetAttributeValue("Index").ToString(); // or you could also use the ChildIndex attribute: String index = childNode1.Element.GetAttributeValue("ChildIndex").ToString();Regards,
Markus
Re: Index of ChildNode in a Tree
Thanks Markus,its working fine.... 
The above problem is solved.Now I am moving one of the child Node from one parent node to another.
After moving from one parent to another the focus will be on the second consecutive child node.
I need to verify whether the focus is on second child node or not.
Pls help me in solving this ASAP
Thanks,
Rakesh

The above problem is solved.Now I am moving one of the child Node from one parent node to another.
After moving from one parent to another the focus will be on the second consecutive child node.
I need to verify whether the focus is on second child node or not.
Pls help me in solving this ASAP
Thanks,
Rakesh
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Index of ChildNode in a Tree
Hello,
You can use the "HasFocus" property.
In order to set the focus on a specific element you can use the "Focus()" method.
Please let me know if you need any further information or assistance.
Regards,
Bernhard
You can use the "HasFocus" property.
In order to set the focus on a specific element you can use the "Focus()" method.
Please let me know if you need any further information or assistance.
Regards,
Bernhard