Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using a tree view and inserted some nodes...say
Parent1
child1
child2
parent2
child1
child2
child3
parent3
child1

and so on..there are two buttons NEXT and PREVIOUS now i want to select next and previous nodes within a selected parent on next button click and previous button click respectively. as soon as the last node of the parent is selected next button looses its visibility and same for previous button..else both the buttons are visible.
Please help me out..supply the code with suggestion as well please..
Thanks in advance..
Posted

1 solution

Same answer as last time - the control has nextnode and previousnode methods.
 
Share this answer
 
Comments
namaskaaar 7-Feb-12 14:24pm    
how to set the buttons visibility??? if there are two nodes in the parent then the button is set visible false at the third click..i want as soon as the last node is selected the button visibility is set to false..
Sergey Alexandrovich Kryukov 7-Feb-12 17:04pm    
Excuse me, why do you keep asking?

You did not even specify which type are your looking at. TreeView is not a type, this is just a common name for several classes; I immediately can remember 3 of them. In a way, you are asking about something which does not exist in actual reality.

Please, provide fully-qualified names and tag you application type and UI library.
--SA
namaskaaar 8-Feb-12 2:01am    
i am talking about treeview control windows form visual c# now is it clear...
Christian Graus 7-Feb-12 14:26pm    
Check if the property tells you that there is no next node.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900